From a0b675ec9e57af8bc631fc8cc54d062b58669a9f Mon Sep 17 00:00:00 2001 From: Vaxry Date: Tue, 17 Oct 2023 20:09:54 +0100 Subject: binds: add ignoreMods flag --- src/managers/KeybindManager.cpp | 3 ++- src/managers/KeybindManager.hpp | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) (limited to 'src/managers') diff --git a/src/managers/KeybindManager.cpp b/src/managers/KeybindManager.cpp index cd99c61f..7e0b7620 100644 --- a/src/managers/KeybindManager.cpp +++ b/src/managers/KeybindManager.cpp @@ -435,7 +435,8 @@ bool CKeybindManager::handleKeybinds(const uint32_t& modmask, const std::string& const bool IGNORECONDITIONS = SPECIALDISPATCHER && !pressed && SPECIALTRIGGERED; // ignore mods. Pass, global dispatchers should be released immediately once the key is released. - if (!IGNORECONDITIONS && (modmask != k.modmask || (g_pCompositor->m_sSeat.exclusiveClient && !k.locked) || k.submap != m_szCurrentSelectedSubmap || k.shadowed)) + if (!IGNORECONDITIONS && + ((modmask != k.modmask && !k.ignoreMods) || (g_pCompositor->m_sSeat.exclusiveClient && !k.locked) || k.submap != m_szCurrentSelectedSubmap || k.shadowed)) continue; if (!key.empty()) { diff --git a/src/managers/KeybindManager.hpp b/src/managers/KeybindManager.hpp index 9c63249e..8a0b3b89 100644 --- a/src/managers/KeybindManager.hpp +++ b/src/managers/KeybindManager.hpp @@ -23,12 +23,14 @@ struct SKeybind { bool mouse = false; bool nonConsuming = false; bool transparent = false; + bool ignoreMods = false; // DO NOT INITIALIZE bool shadowed = false; }; -enum eFocusWindowMode { +enum eFocusWindowMode +{ MODE_CLASS_REGEX = 0, MODE_TITLE_REGEX, MODE_ADDRESS, -- cgit v1.2.3