]> git.mdlowis.com Git - proto/labwc.git/commitdiff
keybind: Fix shift modifiers
authorJoshua Ashton <joshua@froggi.es>
Thu, 21 Oct 2021 17:09:53 +0000 (17:09 +0000)
committerJohan Malm <johanmalm@users.noreply.github.com>
Thu, 21 Oct 2021 17:15:42 +0000 (18:15 +0100)
Need to lower the syms for these to match!

Signed-off-by: Joshua Ashton <joshua@froggi.es>
src/config/keybind.c
src/keyboard.c

index d26082bc4a80be83374614c9642f59950e4dea00..b69a8fac64f0a1c9b02681a1027f2398bba6a4b3 100644 (file)
@@ -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);
index dd1452ec72f5dc26e35ba883ca27d4f055a22265..1be8d7a05d88aee7f158608d0f0f403b8a87fb12 100644 (file)
@@ -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;