diff options
| author | littleblack111 <littleblack11111@gmail.com> | 2024-11-16 07:21:59 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-11-15 23:21:59 +0000 |
| commit | 7affc34ab43c5d5cbf670759b839a9e990d8bbea (patch) | |
| tree | 0216331ac38eb1333e91cb786ff8bb2c3aaccb1d /src/managers/KeybindManager.hpp | |
| parent | 098e491a43e8b26f4382b48651a4131464bf6a2f (diff) | |
bind: new long press option (#8302)
---------
Co-authored-by: Vaxry <vaxry@vaxry.net>
Diffstat (limited to 'src/managers/KeybindManager.hpp')
| -rw-r--r-- | src/managers/KeybindManager.hpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/managers/KeybindManager.hpp b/src/managers/KeybindManager.hpp index 24a09836..4a0af6e9 100644 --- a/src/managers/KeybindManager.hpp +++ b/src/managers/KeybindManager.hpp @@ -8,6 +8,7 @@ #include <functional> #include <xkbcommon/xkbcommon.h> #include "../devices/IPointer.hpp" +#include "eventLoop/EventLoopTimer.hpp" class CInputManager; class CConfigManager; @@ -28,6 +29,7 @@ struct SKeybind { std::string description = ""; bool release = false; bool repeat = false; + bool longPress = false; bool mouse = false; bool nonConsuming = false; bool transparent = false; @@ -119,7 +121,8 @@ class CKeybindManager { inline static std::string m_szCurrentSelectedSubmap = ""; - SKeybind* m_pActiveKeybind = nullptr; + SKeybind * m_pActiveKeybind = nullptr, *m_pLastLongPressKeybind = nullptr; + SP<CEventLoopTimer> m_pLongPressTimer; uint32_t m_uTimeLastMs = 0; uint32_t m_uLastCode = 0; |
