]> git.mdlowis.com Git - proto/labwc.git/commitdiff
keyboard: prevent storing synthetic layout change key event
authorConsolatis <35009135+Consolatis@users.noreply.github.com>
Sun, 8 Oct 2023 17:26:16 +0000 (19:26 +0200)
committerConsolatis <35009135+Consolatis@users.noreply.github.com>
Sun, 8 Oct 2023 19:11:32 +0000 (21:11 +0200)
Before this patch, we were storing the key in our pressed set
and didn't remove it which in turn caused all further keybinds
to fail. The behavior was dependent on the exact flow of press
and release events and was most obvious when using
XKB_DEFAULT_OPTIONS=grp:alt_shift_toggle

We now simply treat it as a modifier and thus do not store it
in the pressed set.

Fixes: #1129
src/keyboard.c

index 2b7051408c78ccc81ee97fe12966382891bc3eff..a589ee8fce4c51df8aaa96f5d8b3bee4560d2c71 100644 (file)
@@ -133,7 +133,9 @@ static bool is_modifier_key(xkb_keysym_t sym)
                || sym == XKB_KEY_Super_R
                /* Right hand Alt key for Mod5 */
                || sym == XKB_KEY_Mode_switch
-               || sym == XKB_KEY_ISO_Level3_Shift;
+               || sym == XKB_KEY_ISO_Level3_Shift
+               /* Prevents storing layout change notifier in pressed */
+               || sym == XKB_KEY_ISO_Next_Group;
 }
 
 struct keysyms {