added keybind repeat flag

This commit is contained in:
vaxerski
2022-07-25 14:42:49 +02:00
parent 067e2d39f6
commit bb539f0a8d
3 changed files with 52 additions and 2 deletions

View File

@@ -15,6 +15,7 @@ struct SKeybind {
bool locked = false;
std::string submap = "";
bool release = false;
bool repeat = false;
// DO NOT INITIALIZE
bool shadowed = false;
@@ -35,6 +36,8 @@ public:
std::unordered_map<std::string, std::function<void(std::string)>> m_mDispatchers;
wl_event_source* m_pActiveKeybindEventSource = nullptr;
private:
std::list<SKeybind> m_lKeybinds;
std::deque<xkb_keysym_t> m_dPressedKeysyms;
@@ -44,6 +47,8 @@ private:
xkb_keysym_t m_kHeldBack = 0;
SKeybind* m_pActiveKeybind = nullptr;
bool handleKeybinds(const uint32_t&, const std::string&, const xkb_keysym_t&, const int&, bool, uint32_t);
bool handleInternalKeybinds(xkb_keysym_t);