mirror of
https://github.com/hyprwm/Hypr.git
synced 2024-11-23 22:05:58 +01:00
I am an idiot, keysym fix
This commit is contained in:
parent
245712664e
commit
1898839d4c
2 changed files with 8 additions and 3 deletions
|
@ -21,8 +21,13 @@ uint32_t KeybindManager::getKeyCodeFromName(std::string name) {
|
|||
if (name == "")
|
||||
return 0;
|
||||
|
||||
if (name.find_first_not_of("1234567890") == std::string::npos)
|
||||
return std::stoi(name);
|
||||
if (name.find_first_not_of("1234567890") == std::string::npos) {
|
||||
const auto KC = std::stoi(name);
|
||||
|
||||
if (KC > 10) // 0-9 are OK for parsing they are on the KB
|
||||
return std::stoi(name);
|
||||
}
|
||||
|
||||
|
||||
const auto ORIGINALCASENAME = name;
|
||||
transform(name.begin(), name.end(), name.begin(), ::tolower);
|
||||
|
|
|
@ -780,7 +780,7 @@ void Events::eventKeyPress(xcb_generic_event_t* event) {
|
|||
const auto IGNOREDMOD = KeybindManager::modToMask(ConfigManager::getString("ignore_mod"));
|
||||
|
||||
for (auto& keybind : KeybindManager::keybinds) {
|
||||
if (keybind.getKeysym() != 0 && keybind.getKeysym() == KEYSYM && (keybind.getMod() == E->state || ((keybind.getMod() | IGNOREDMOD) == E->state))) {
|
||||
if (keybind.getKeysym() != 0 && keybind.getKeysym() == KEYSYM && ((keybind.getMod() == E->state) || ((keybind.getMod() | IGNOREDMOD) == E->state))) {
|
||||
keybind.getDispatcher()(keybind.getCommand());
|
||||
return;
|
||||
// TODO: fix duplicating keybinds
|
||||
|
|
Loading…
Reference in a new issue