bind: new long press option (#8302)
--------- Co-authored-by: Vaxry <vaxry@vaxry.net>
This commit is contained in:
parent
098e491a43
commit
7affc34ab4
4 changed files with 53 additions and 12 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue