diff options
| author | Can <45462997+yungcxn@users.noreply.github.com> | 2024-05-24 20:58:26 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-05-24 20:58:26 +0200 |
| commit | ce17961aad6f9164e5d026d19efd42b07b123bff (patch) | |
| tree | 0bd5c9ea8da8a777734baa57fa301bdb5580511c /src/managers/KeybindManager.hpp | |
| parent | 6d67b84469d5c12c5bbc4880f327ca8eb7a2ed2d (diff) | |
keybinds: Added new dispatcher (sendshortcut) (#6174)
Diffstat (limited to 'src/managers/KeybindManager.hpp')
| -rw-r--r-- | src/managers/KeybindManager.hpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/managers/KeybindManager.hpp b/src/managers/KeybindManager.hpp index a2025bb0..a5499987 100644 --- a/src/managers/KeybindManager.hpp +++ b/src/managers/KeybindManager.hpp @@ -95,6 +95,12 @@ class CKeybindManager { std::list<SKeybind> m_lKeybinds; + //since we cant find keycode through keyname in xkb: + //on sendshortcut call, we once search for keyname (e.g. "g") the correct keycode (e.g. 42) + //and cache it in this map to make sendshortcut calls faster + //we also store the keyboard pointer (in the string) to differentiate between different keyboard (layouts) + std::unordered_map<std::string, xkb_keycode_t> m_mKeyToCodeCache; + private: std::deque<SPressedKeyWithMods> m_dPressedKeys; @@ -177,6 +183,7 @@ class CKeybindManager { static void focusWindow(std::string); static void setSubmap(std::string); static void pass(std::string); + static void sendshortcut(std::string); static void layoutmsg(std::string); static void toggleOpaque(std::string); static void dpms(std::string); |
