diff options
| author | MightyPlaza <123664421+MightyPlaza@users.noreply.github.com> | 2024-07-24 12:10:36 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-07-24 14:10:36 +0200 |
| commit | 72bce7efd5b302412f13485af27985965ddf830f (patch) | |
| tree | d1236a7bfd80dc07d9f7bb49f48957c11b987463 /src/managers/KeybindManager.cpp | |
| parent | 99088eaed806d9268967baf09bc09cdb987c5357 (diff) | |
keybinds: add bindp and noshortcutsinhibit (#7017)
Diffstat (limited to 'src/managers/KeybindManager.cpp')
| -rw-r--r-- | src/managers/KeybindManager.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/managers/KeybindManager.cpp b/src/managers/KeybindManager.cpp index e9dfd1ae..185426dd 100644 --- a/src/managers/KeybindManager.cpp +++ b/src/managers/KeybindManager.cpp @@ -607,10 +607,8 @@ bool CKeybindManager::handleKeybinds(const uint32_t modmask, const SPressedKeyWi static auto PDISABLEINHIBIT = CConfigValue<Hyprlang::INT>("binds:disable_keybind_grabbing"); - if (!*PDISABLEINHIBIT && PROTO::shortcutsInhibit->isInhibited()) { + if (!*PDISABLEINHIBIT && PROTO::shortcutsInhibit->isInhibited()) Debug::log(LOG, "Keybind handling is disabled due to an inhibitor"); - return false; - } for (auto& k : m_lKeybinds) { const bool SPECIALDISPATCHER = k.handler == "global" || k.handler == "pass" || k.handler == "sendshortcut" || k.handler == "mouse"; @@ -619,6 +617,9 @@ bool CKeybindManager::handleKeybinds(const uint32_t modmask, const SPressedKeyWi const bool IGNORECONDITIONS = SPECIALDISPATCHER && !pressed && SPECIALTRIGGERED; // ignore mods. Pass, global dispatchers should be released immediately once the key is released. + if (!k.dontInhibit && !*PDISABLEINHIBIT && PROTO::shortcutsInhibit->isInhibited()) + continue; + if (!k.locked && g_pSessionLockManager->isSessionLocked()) continue; |
