From 95ce9e026493afe95b133d71a3ab67dfe45a9d6c Mon Sep 17 00:00:00 2001 From: Joshua Ashton Date: Thu, 21 Oct 2021 17:09:53 +0000 Subject: [PATCH] keybind: Fix shift modifiers Need to lower the syms for these to match! Signed-off-by: Joshua Ashton --- src/config/keybind.c | 4 ++-- src/keyboard.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/config/keybind.c b/src/config/keybind.c index d26082bc..b69a8fac 100644 --- a/src/config/keybind.c +++ b/src/config/keybind.c @@ -36,8 +36,8 @@ keybind_create(const char *keybind) if (modifier != 0) { k->modifiers |= modifier; } else { - xkb_keysym_t sym = xkb_keysym_from_name( - symname, XKB_KEYSYM_CASE_INSENSITIVE); + xkb_keysym_t sym = xkb_keysym_to_lower( + xkb_keysym_from_name(symname, XKB_KEYSYM_CASE_INSENSITIVE)); if (sym == XKB_KEY_NoSymbol) { wlr_log(WLR_ERROR, "unknown keybind (%s)", symname); free(k); diff --git a/src/keyboard.c b/src/keyboard.c index dd1452ec..1be8d7a0 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -63,7 +63,7 @@ handle_keybinding(struct server *server, uint32_t modifiers, xkb_keysym_t sym) continue; } for (size_t i = 0; i < keybind->keysyms_len; i++) { - if (sym == keybind->keysyms[i]) { + if (xkb_keysym_to_lower(sym) == keybind->keysyms[i]) { action(server, keybind->action, keybind->command); return true; -- 2.52.0