parent
0469716fd6
commit
b00d36fca5
|
@ -38,6 +38,9 @@ bindsym Mod4+a nop a
|
|||
|
||||
# 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);
|
||||
|
@ -114,8 +117,34 @@ is(listen_for_binding(
|
|||
'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);
|
||||
|
||||
|
@ -159,7 +188,7 @@ is(listen_for_binding(
|
|||
# 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);
|
||||
|
||||
|
|
Loading…
Reference in New Issue