diff options
author | dec05eba <dec05eba@protonmail.com> | 2025-01-23 21:23:19 +0100 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2025-01-23 21:25:45 +0100 |
commit | 1d9d4d6398e989d0628cb4dab0273293b79b4816 (patch) | |
tree | d5c4bd8c6f27d84156177831f1c0e6beb0de762a /include/GlobalHotkeys.hpp | |
parent | 47ada4d79844d9a98d9689d0de0c92864e0fc372 (diff) |
Make hotkeys reconfigurable, faster hotkey startup time, fix some keyboard locale issues
Diffstat (limited to 'include/GlobalHotkeys.hpp')
-rw-r--r-- | include/GlobalHotkeys.hpp | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/include/GlobalHotkeys.hpp b/include/GlobalHotkeys.hpp index 27fca07..2927fa7 100644 --- a/include/GlobalHotkeys.hpp +++ b/include/GlobalHotkeys.hpp @@ -9,9 +9,20 @@ namespace mgl { } namespace gsr { + enum HotkeyModifier : uint32_t { + HOTKEY_MOD_LSHIFT = 1 << 0, + HOTKEY_MOD_RSHIFT = 1 << 1, + HOTKEY_MOD_LCTRL = 1 << 2, + HOTKEY_MOD_RCTRL = 1 << 3, + HOTKEY_MOD_LALT = 1 << 4, + HOTKEY_MOD_RALT = 1 << 5, + HOTKEY_MOD_LSUPER = 1 << 6, + HOTKEY_MOD_RSUPER = 1 << 7 + }; + struct Hotkey { - uint64_t key = 0; - uint32_t modifiers = 0; + uint32_t key = 0; // X11 keysym + uint32_t modifiers = 0; // HotkeyModifier }; using GlobalHotkeyCallback = std::function<void(const std::string &id)>; |