diff options
| author | Darksome <dev@darkso.me> | 2022-07-21 19:18:03 +0300 |
|---|---|---|
| committer | Darksome <dev@darkso.me> | 2022-07-21 19:18:03 +0300 |
| commit | eb8a1939e6dddaaf81f6b623d1c657b801978487 (patch) | |
| tree | d62d4ca30d4114fe2e2745e36907b65ac4be20af /src/managers/KeybindManager.hpp | |
| parent | 68cfc1a496f556f360c032651b75d33ddb576517 (diff) | |
| parent | 7f660fed0d4a8133ccde21c3e092dbc8c6e08c60 (diff) | |
Merge upstream
Diffstat (limited to 'src/managers/KeybindManager.hpp')
| -rw-r--r-- | src/managers/KeybindManager.hpp | 25 |
1 files changed, 23 insertions, 2 deletions
diff --git a/src/managers/KeybindManager.hpp b/src/managers/KeybindManager.hpp index 049568a6..4fa314a9 100644 --- a/src/managers/KeybindManager.hpp +++ b/src/managers/KeybindManager.hpp @@ -14,13 +14,19 @@ struct SKeybind { std::string arg = ""; bool locked = false; std::string submap = ""; + bool release = false; + + // DO NOT INITIALIZE + bool shadowed = false; }; class CKeybindManager { public: CKeybindManager(); - bool handleKeybinds(const uint32_t&, const std::string&, const xkb_keysym_t&, const int&); + bool onKeyEvent(wlr_keyboard_key_event*, SKeyboard*); + bool onAxisEvent(wlr_pointer_axis_event*); + void addKeybind(SKeybind); void removeKeybind(uint32_t, const std::string&); uint32_t stringToModMask(std::string); @@ -30,9 +36,17 @@ public: private: std::list<SKeybind> m_lKeybinds; + std::deque<xkb_keysym_t> m_dPressedKeysyms; + std::deque<uint32_t> m_dPressedKeycodes; inline static std::string m_szCurrentSelectedSubmap = ""; + xkb_keysym_t m_kHeldBack = 0; + + bool handleKeybinds(const uint32_t&, const std::string&, const xkb_keysym_t&, const int&, bool, uint32_t); + + void shadowKeybinds(); + bool handleInternalKeybinds(xkb_keysym_t); bool handleVT(xkb_keysym_t); @@ -66,6 +80,13 @@ private: static void setSubmap(std::string); friend class CCompositor; + + enum eFocusWindowMode { + MODE_CLASS_REGEX = 0, + MODE_TITLE_REGEX, + MODE_ADDRESS, + MODE_PID + }; }; -inline std::unique_ptr<CKeybindManager> g_pKeybindManager;
\ No newline at end of file +inline std::unique_ptr<CKeybindManager> g_pKeybindManager; |
