diff options
| author | Levizor <levizorri@gmail.com> | 2025-09-09 15:19:51 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-09-09 14:19:51 +0100 |
| commit | 150d693fe794a01aab762a18d2d8a2c8bc54b43c (patch) | |
| tree | bf3bb839bc32d621aa54c597bae5267198e37f84 /src/devices/IKeyboard.hpp | |
| parent | ecc9e4d8cd7a86f5f7d7541bee9b092122d2fa83 (diff) | |
hyprctl: add an active layout index field in devices (#11531)
Diffstat (limited to 'src/devices/IKeyboard.hpp')
| -rw-r--r-- | src/devices/IKeyboard.hpp | 35 |
1 files changed, 18 insertions, 17 deletions
diff --git a/src/devices/IKeyboard.hpp b/src/devices/IKeyboard.hpp index f4fb667b..c7832548 100644 --- a/src/devices/IKeyboard.hpp +++ b/src/devices/IKeyboard.hpp @@ -65,23 +65,24 @@ class IKeyboard : public IHID { std::string rules = ""; }; - void setKeymap(const SStringRuleNames& rules); - void updateXKBTranslationState(xkb_keymap* const keymap = nullptr); - std::string getActiveLayout(); - std::optional<uint32_t> getLEDs(); - void updateLEDs(); - void updateLEDs(uint32_t leds); - uint32_t getModifiers(); - void updateModifiers(uint32_t depressed, uint32_t latched, uint32_t locked, uint32_t group); - bool updateModifiersState(); // rets whether changed - void updateXkbStateWithKey(uint32_t xkbKey, bool pressed); - void updateKeymapFD(); - bool getPressed(uint32_t key); - bool shareStates(); - - bool m_active = false; - bool m_enabled = true; - bool m_allowBinds = true; + void setKeymap(const SStringRuleNames& rules); + void updateXKBTranslationState(xkb_keymap* const keymap = nullptr); + std::optional<xkb_layout_index_t> getActiveLayoutIndex(); + std::string getActiveLayout(); + std::optional<uint32_t> getLEDs(); + void updateLEDs(); + void updateLEDs(uint32_t leds); + uint32_t getModifiers(); + void updateModifiers(uint32_t depressed, uint32_t latched, uint32_t locked, uint32_t group); + bool updateModifiersState(); // rets whether changed + void updateXkbStateWithKey(uint32_t xkbKey, bool pressed); + void updateKeymapFD(); + bool getPressed(uint32_t key); + bool shareStates(); + + bool m_active = false; + bool m_enabled = true; + bool m_allowBinds = true; // permission flag: whether this keyboard is allowed to be processed bool m_allowed = true; |
