keybinds: add bindp and noshortcutsinhibit (#7017)
This commit is contained in:
parent
99088eaed8
commit
72bce7efd5
6 changed files with 34 additions and 23 deletions
|
|
@ -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 {};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue