From 72bce7efd5b302412f13485af27985965ddf830f Mon Sep 17 00:00:00 2001 From: MightyPlaza <123664421+MightyPlaza@users.noreply.github.com> Date: Wed, 24 Jul 2024 12:10:36 +0000 Subject: keybinds: add bindp and noshortcutsinhibit (#7017) --- src/config/ConfigManager.cpp | 8 ++++++-- src/config/ConfigManager.hpp | 1 + 2 files changed, 7 insertions(+), 2 deletions(-) (limited to 'src/config') 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 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 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 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 {}; diff --git a/src/config/ConfigManager.hpp b/src/config/ConfigManager.hpp index df7c202b..b4a49b7a 100644 --- a/src/config/ConfigManager.hpp +++ b/src/config/ConfigManager.hpp @@ -182,6 +182,7 @@ class CConfigManager { {"nomaxsize", [](PHLWINDOW pWindow) { return &pWindow->m_sWindowData.noMaxSize; }}, {"norounding", [](PHLWINDOW pWindow) { return &pWindow->m_sWindowData.noRounding; }}, {"noshadow", [](PHLWINDOW pWindow) { return &pWindow->m_sWindowData.noShadow; }}, + {"noshortcutsinhibit", [](PHLWINDOW pWindow) { return &pWindow->m_sWindowData.noShortcutsInhibit; }}, {"opaque", [](PHLWINDOW pWindow) { return &pWindow->m_sWindowData.opaque; }}, {"forcergbx", [](PHLWINDOW pWindow) { return &pWindow->m_sWindowData.RGBX; }}, {"immediate", [](PHLWINDOW pWindow) { return &pWindow->m_sWindowData.tearing; }}, -- cgit v1.2.3