keyboard: make keybind match stricter

...and avoid failing to send release events to clients for any keys that were
not absorbed by a keybind.

Do not match keybinds if there are other non-modifier keys (not part of any
defined bind) pressed at the same time.

Only store non-modifier keycodes in the key-state.c 'pressed' array.
This makes the call to wlr_seat_keyboard_notify_enter() in seat_focus()
consistent with the equivalent in sway (in seat_keyboard_notify_enter()).

Fixes: issue #1091
This commit is contained in:
Johan Malm 2023-09-26 17:51:54 +01:00 committed by Johan Malm
parent 3022985ba7
commit e77330bc3f
3 changed files with 49 additions and 9 deletions

View file

@ -102,3 +102,9 @@ key_state_nr_keys(void)
{
return bound.nr_keys;
}
int
key_state_nr_pressed_keys(void)
{
return pressed.nr_keys;
}