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/config/ConfigManager.cpp | |
| parent | 99088eaed806d9268967baf09bc09cdb987c5357 (diff) | |
keybinds: add bindp and noshortcutsinhibit (#7017)
Diffstat (limited to 'src/config/ConfigManager.cpp')
| -rw-r--r-- | src/config/ConfigManager.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/config/ConfigManager.cpp b/src/config/ConfigManager.cpp index 6928a802..5a8f2bd2 100644 --- a/src/config/ConfigManager.cpp +++ b/src/config/ConfigManager.cpp @@ -1983,6 +1983,7 @@ std::optional<std::string> CConfigManager::handleBind(const std::string& command bool ignoreMods = false; bool multiKey = false; bool hasDescription = false; + bool dontInhibit = false; const auto BINDARGS = command.substr(4); for (auto& arg : BINDARGS) { @@ -2004,6 +2005,8 @@ std::optional<std::string> CConfigManager::handleBind(const std::string& command multiKey = true; } else if (arg == 'd') { hasDescription = true; + } else if (arg == 'p') { + dontInhibit = true; } else { return "bind: invalid flag"; } @@ -2072,8 +2075,9 @@ std::optional<std::string> CConfigManager::handleBind(const std::string& command return "Invalid catchall, catchall keybinds are only allowed in submaps."; } - g_pKeybindManager->addKeybind(SKeybind{parsedKey.key, KEYSYMS, parsedKey.keycode, parsedKey.catchAll, MOD, MODS, HANDLER, COMMAND, locked, m_szCurrentSubmap, DESCRIPTION, - release, repeat, mouse, nonConsuming, transparent, ignoreMods, multiKey, hasDescription}); + g_pKeybindManager->addKeybind(SKeybind{ + parsedKey.key, KEYSYMS, parsedKey.keycode, parsedKey.catchAll, MOD, MODS, HANDLER, COMMAND, locked, m_szCurrentSubmap, DESCRIPTION, release, + repeat, mouse, nonConsuming, transparent, ignoreMods, multiKey, hasDescription, dontInhibit}); } return {}; |
