summaryrefslogtreecommitdiff
path: root/src/managers/KeybindManager.cpp
diff options
context:
space:
mode:
authorshezdy <77217897+shezdy@users.noreply.github.com>2024-05-11 17:02:26 -0600
committerGitHub <noreply@github.com>2024-05-12 00:02:26 +0100
commit15072831cfd9efccebd1ad27b21c5604f224aa1b (patch)
treed95c7f36e2c1f9b1e3064a859259430a8bf829c0 /src/managers/KeybindManager.cpp
parent8562d3847777317e98e689d443e4d203b568c630 (diff)
keybinds: fix release binds in submaps (#6025)
Diffstat (limited to 'src/managers/KeybindManager.cpp')
-rw-r--r--src/managers/KeybindManager.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/managers/KeybindManager.cpp b/src/managers/KeybindManager.cpp
index 15f667f0..286372c4 100644
--- a/src/managers/KeybindManager.cpp
+++ b/src/managers/KeybindManager.cpp
@@ -386,8 +386,7 @@ bool CKeybindManager::onKeyEvent(std::any event, SP<IKeyboard> pKeyboard) {
bool foundInPressedKeys = false;
for (auto it = m_dPressedKeys.begin(); it != m_dPressedKeys.end();) {
if (it->keycode == KEYCODE) {
- if (it->submapAtPress == m_szCurrentSelectedSubmap)
- handleKeybinds(MODS, *it, false);
+ handleKeybinds(MODS, *it, false);
foundInPressedKeys = true;
suppressEvent = !it->sent;
it = m_dPressedKeys.erase(it);
@@ -570,7 +569,7 @@ bool CKeybindManager::handleKeybinds(const uint32_t modmask, const SPressedKeyWi
if (key.keycode != k.keycode)
continue;
} else if (k.catchAll) {
- if (found)
+ if (found || key.submapAtPress != m_szCurrentSelectedSubmap)
continue;
} else {
// oMg such performance hit!!11!