keybinds: add bindp and noshortcutsinhibit (#7017)

This commit is contained in:
MightyPlaza
2024-07-24 12:10:36 +00:00
committed by GitHub
parent 99088eaed8
commit 72bce7efd5
6 changed files with 34 additions and 23 deletions

View File

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