summaryrefslogtreecommitdiff
path: root/src/managers/KeybindManager.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/managers/KeybindManager.hpp')
-rw-r--r--src/managers/KeybindManager.hpp7
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);