# Binding which should work with numlock and without, see issue #2418.
bindsym Escape nop Escape
+
+# Binding which should work with numlock and without, see issue #2418.
+bindsym Shift+Escape nop Shift+Escape
EOT
my $pid = launch_with_config($config);
'Escape',
'triggered the "Escape" keybinding');
+is(listen_for_binding(
+ sub {
+ xtest_key_press(50); # Shift_L
+ xtest_key_press(9); # Escape
+ xtest_key_release(9); # Escape
+ xtest_key_release(50); # Shift_L
+ },
+ ),
+ 'Shift+Escape',
+ 'triggered the "Escape" keybinding');
+
+is(listen_for_binding(
+ sub {
+ xtest_key_press(77); # enable Num_Lock
+ xtest_key_release(77); # enable Num_Lock
+ xtest_key_press(50); # Shift_L
+ xtest_key_press(9); # Escape
+ xtest_key_release(9); # Escape
+ xtest_key_release(50); # Shift_L
+ xtest_key_press(77); # disable Num_Lock
+ xtest_key_release(77); # disable Num_Lock
+ },
+ ),
+ 'Shift+Escape',
+ 'triggered the "Escape" keybinding');
+
sync_with_i3;
-is(scalar @i3test::XTEST::binding_events, 6, 'Received exactly 4 binding events');
+is(scalar @i3test::XTEST::binding_events, 8, 'Received exactly 8 binding events');
exit_gracefully($pid);
# TODO: This test does not verify that i3 does _NOT_ grab keycode 87 with Mod2.
sync_with_i3;
-is(scalar @i3test::XTEST::binding_events, 7, 'Received exactly 5 binding events');
+is(scalar @i3test::XTEST::binding_events, 9, 'Received exactly 9 binding events');
exit_gracefully($pid);