labwc/include/input
tokyo4j 885db240f3 keyboard: simplify key state handling
We used to store both `pressed` keys and `bound` keys and derive
`pressed_sent` keys from them, which are notified to the client when
switching focus. But I think this was overengineered and we can remove
`pressed` keys and `bound` keys. Instead we now directly modify
`pressed_sent` keys just before calling `wlr_seat_keyboard_notify_key()`.

Technically we could even remove `pressed_sent` keys as they are
duplicated in wlr_seat->keyboard_state.keyboard->keycodes, but we keep
`pressed_sent` keys as it is easier to access.

The only place which required `bound` keys was `handle_modifiers()`.
This function checked `bound` keys to keep widnow switcher alive when
Alt-Tab is pressed and only the Alt modifier is released. The window
switcher is then finished when Tab key is released. I replaced the check
with `(seat->keyboard_group->keyboard.num_keycodes > 0)`. This slightly
changes the behavior; when Alt-Tab and any other key e.g. X are pressed
and Tab key and Alt modifier are released, the window switcher is now
kept alive. But I don't think this breaks any workflows for users.
2026-05-04 17:01:36 +09:00
..
cursor.h tree-wide: rename g_server to just server 2026-03-21 21:35:33 +00:00
gestures.h Move gesture handling out of cursor.c 2023-10-30 21:14:04 +00:00
ime.h tree-wide: use forward declarations for wlr types 2025-09-07 19:34:30 +09:00
input.h include: move a few types from labwc.h to better locations 2025-07-30 21:04:31 +01:00
key-state.h keyboard: simplify key state handling 2026-05-04 17:01:36 +09:00
keyboard.h include: move a few types from labwc.h to better locations 2025-07-30 21:04:31 +01:00
tablet-pad.h tree-wide: use forward declarations for wlr types 2025-09-07 19:34:30 +09:00
tablet.h tree-wide: use forward declarations for wlr types 2025-09-07 19:34:30 +09:00
touch.h Make touch depend on cursor to prevent racing 2023-10-30 21:14:04 +00:00