keybinds: fix release binds in submaps (#6025)

This commit is contained in:
shezdy 2024-05-11 17:02:26 -06:00 committed by GitHub
parent 8562d38477
commit 15072831cf
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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!