From ce821294e21978cadf4c3facbeec421b245ea2c9 Mon Sep 17 00:00:00 2001 From: davc0n Date: Fri, 2 May 2025 17:07:20 +0200 Subject: managers: refactor class member vars (#10242) --- src/managers/KeybindManager.hpp | 38 ++++++++++++++++++++------------------ 1 file changed, 20 insertions(+), 18 deletions(-) (limited to 'src/managers/KeybindManager.hpp') diff --git a/src/managers/KeybindManager.hpp b/src/managers/KeybindManager.hpp index ede16402..be2d114b 100644 --- a/src/managers/KeybindManager.hpp +++ b/src/managers/KeybindManager.hpp @@ -100,50 +100,52 @@ class CKeybindManager { void shadowKeybinds(const xkb_keysym_t& doesntHave = 0, const uint32_t doesntHaveCode = 0); std::string getCurrentSubmap(); - std::unordered_map> m_mDispatchers; + std::unordered_map> m_dispatchers; - bool m_bGroupsLocked = false; + bool m_groupsLocked = false; - std::vector> m_vKeybinds; + std::vector> m_keybinds; //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 m_mKeyToCodeCache; + std::unordered_map m_keyToCodeCache; static SDispatchResult changeMouseBindMode(const eMouseBindMode mode); private: - std::vector m_dPressedKeys; + std::vector m_pressedKeys; - inline static std::string m_szCurrentSelectedSubmap = ""; + inline static std::string m_currentSelectedSubmap = ""; - std::vector> m_vActiveKeybinds; - WP m_pLastLongPressKeybind; - SP m_pLongPressTimer, m_pRepeatKeyTimer; + std::vector> m_activeKeybinds; + WP m_lastLongPressKeybind; - uint32_t m_uTimeLastMs = 0; - uint32_t m_uLastCode = 0; - uint32_t m_uLastMouseCode = 0; + SP m_longPressTimer; + SP m_repeatKeyTimer; - std::vector> m_vPressedSpecialBinds; + uint32_t m_timeLastMs = 0; + uint32_t m_lastCode = 0; + uint32_t m_lastMouseCode = 0; - int m_iPassPressed = -1; // used for pass + std::vector> m_pressedSpecialBinds; - CTimer m_tScrollTimer; + int m_passPressed = -1; // used for pass + + CTimer m_scrollTimer; SDispatchResult handleKeybinds(const uint32_t, const SPressedKeyWithMods&, bool); - std::set m_sMkKeys = {}; - std::set m_sMkMods = {}; + std::set m_mkKeys = {}; + std::set m_mkMods = {}; eMultiKeyCase mkBindMatches(const SP); eMultiKeyCase mkKeysymSetMatches(const std::set, const std::set); bool handleInternalKeybinds(xkb_keysym_t); bool handleVT(xkb_keysym_t); - xkb_state* m_pXKBTranslationState = nullptr; + xkb_state* m_xkbTranslationState = nullptr; void updateXKBTranslationState(); bool ensureMouseBindState(); -- cgit v1.2.3