summaryrefslogtreecommitdiff
path: root/src/managers/KeybindManager.hpp
diff options
context:
space:
mode:
authordavc0n <dconti.dev@gmail.com>2025-05-02 17:07:20 +0200
committerGitHub <noreply@github.com>2025-05-02 17:07:20 +0200
commitce821294e21978cadf4c3facbeec421b245ea2c9 (patch)
treeaa90efb5251160cd1ed37fc9443f596f80f6dd96 /src/managers/KeybindManager.hpp
parent6f174a9e0892aab5c4c17a7da9be7f92bcdcebec (diff)
managers: refactor class member vars (#10242)
Diffstat (limited to 'src/managers/KeybindManager.hpp')
-rw-r--r--src/managers/KeybindManager.hpp38
1 files changed, 20 insertions, 18 deletions
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<std::string, std::function<SDispatchResult(std::string)>> m_mDispatchers;
+ std::unordered_map<std::string, std::function<SDispatchResult(std::string)>> m_dispatchers;
- bool m_bGroupsLocked = false;
+ bool m_groupsLocked = false;
- std::vector<SP<SKeybind>> m_vKeybinds;
+ std::vector<SP<SKeybind>> 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<std::string, xkb_keycode_t> m_mKeyToCodeCache;
+ std::unordered_map<std::string, xkb_keycode_t> m_keyToCodeCache;
static SDispatchResult changeMouseBindMode(const eMouseBindMode mode);
private:
- std::vector<SPressedKeyWithMods> m_dPressedKeys;
+ std::vector<SPressedKeyWithMods> m_pressedKeys;
- inline static std::string m_szCurrentSelectedSubmap = "";
+ inline static std::string m_currentSelectedSubmap = "";
- std::vector<WP<SKeybind>> m_vActiveKeybinds;
- WP<SKeybind> m_pLastLongPressKeybind;
- SP<CEventLoopTimer> m_pLongPressTimer, m_pRepeatKeyTimer;
+ std::vector<WP<SKeybind>> m_activeKeybinds;
+ WP<SKeybind> m_lastLongPressKeybind;
- uint32_t m_uTimeLastMs = 0;
- uint32_t m_uLastCode = 0;
- uint32_t m_uLastMouseCode = 0;
+ SP<CEventLoopTimer> m_longPressTimer;
+ SP<CEventLoopTimer> m_repeatKeyTimer;
- std::vector<WP<SKeybind>> 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<WP<SKeybind>> 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<xkb_keysym_t> m_sMkKeys = {};
- std::set<xkb_keysym_t> m_sMkMods = {};
+ std::set<xkb_keysym_t> m_mkKeys = {};
+ std::set<xkb_keysym_t> m_mkMods = {};
eMultiKeyCase mkBindMatches(const SP<SKeybind>);
eMultiKeyCase mkKeysymSetMatches(const std::set<xkb_keysym_t>, const std::set<xkb_keysym_t>);
bool handleInternalKeybinds(xkb_keysym_t);
bool handleVT(xkb_keysym_t);
- xkb_state* m_pXKBTranslationState = nullptr;
+ xkb_state* m_xkbTranslationState = nullptr;
void updateXKBTranslationState();
bool ensureMouseBindState();