mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-26 06:45:59 +01:00
keybinds: allow code: prefix
This commit is contained in:
parent
471ac474a1
commit
463690a27a
1 changed files with 2 additions and 0 deletions
|
@ -755,6 +755,8 @@ void CConfigManager::handleBind(const std::string& command, const std::string& v
|
|||
if (KEY != "") {
|
||||
if (isNumber(KEY) && std::stoi(KEY) > 9)
|
||||
g_pKeybindManager->addKeybind(SKeybind{"", std::stoi(KEY), MOD, HANDLER, COMMAND, locked, m_szCurrentSubmap, release, repeat, mouse});
|
||||
else if (KEY.find("code:") == 0 && isNumber(KEY.substr(5)))
|
||||
g_pKeybindManager->addKeybind(SKeybind{"", std::stoi(KEY.substr(5)), MOD, HANDLER, COMMAND, locked, m_szCurrentSubmap, release, repeat, mouse});
|
||||
else
|
||||
g_pKeybindManager->addKeybind(SKeybind{KEY, -1, MOD, HANDLER, COMMAND, locked, m_szCurrentSubmap, release, repeat, mouse});
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue