keyseq: add a failing group-switching test For some reason, with the grp:alt_shift_toggle option, the following sequence switches a group: < Left Shift down, Left Alt down > While the reverse doesn't: < Left Alt down, Left Shift down > And it should. Signed-off-by: Ran Benita <ran234@gmail.com>
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43
diff --git a/test/keyseq.c b/test/keyseq.c
index 253735c..2177fcc 100644
--- a/test/keyseq.c
+++ b/test/keyseq.c
@@ -140,18 +140,14 @@ main(void)
.model = "evdev",
.layout = "us,il",
.variant = "",
- .options = "grp:menu_toggle",
+ .options = "grp:alt_shift_toggle,grp:menu_toggle",
};
- char *XXX_remove_me_str;
ctx = xkb_context_new(0);
assert(ctx);
keymap = xkb_map_new_from_names(ctx, &names, 0);
assert(keymap);
- XXX_remove_me_str = xkb_map_get_as_string(keymap);
- fprintf(stderr, "keymap is:\n%s\n\n", XXX_remove_me_str);
-
assert(test_key_seq(keymap,
KEY_H, BOTH, XK_h, NEXT,
KEY_E, BOTH, XK_e, NEXT,
@@ -213,6 +209,18 @@ main(void)
KEY_COMPOSE, BOTH, XK_ISO_Next_Group, NEXT,
KEY_O, BOTH, XK_o, FINISH));
+ assert(test_key_seq(keymap,
+ KEY_LEFTSHIFT, DOWN, XK_Shift_L, NEXT,
+ KEY_LEFTALT, DOWN, XK_ISO_Next_Group, NEXT,
+ KEY_LEFTALT, UP, XK_ISO_Next_Group, NEXT,
+ KEY_LEFTSHIFT, UP, XK_Shift_L, FINISH));
+
+ assert(test_key_seq(keymap,
+ KEY_LEFTALT, DOWN, XK_Alt_L, NEXT,
+ KEY_LEFTSHIFT, DOWN, XK_ISO_Next_Group, NEXT,
+ KEY_LEFTSHIFT, UP, XK_ISO_Next_Group, NEXT,
+ KEY_LEFTALT, UP, XK_Alt_L, FINISH));
+
/* Locked modifiers. */
assert(test_key_seq(keymap,
KEY_CAPSLOCK, BOTH, XK_Caps_Lock, NEXT,