From bd42ea82fc8fe9df59193f20554529983171ec61 Mon Sep 17 00:00:00 2001 From: Julian Orth Date: Tue, 23 Jul 2024 14:34:26 +0200 Subject: [PATCH] protocol: add wl_keyboard.keys event The compositor can use this event together with the keymap and modifiers event to replace the client's view of the XKB state without having to generate synthetic leave, enter, or key events that might cause unintended side effects. A compositor might use this in the following situations: - If the user disconnects a physical keyboard that currently has keys pressed, the compositor might send a keys event with an empty array. - If the user has multiple physical keyboards with different keymaps connected and switches from one to the other, the compositor might use this event when sending the new keymap to the client. Signed-off-by: Julian Orth --- protocol/wayland.xml | 26 ++++++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) diff --git a/protocol/wayland.xml b/protocol/wayland.xml index 9418c62f..44adce12 100644 --- a/protocol/wayland.xml +++ b/protocol/wayland.xml @@ -1880,7 +1880,7 @@ - + A seat is a group of keyboards, pointer and touch devices. This object is published as a global during start up, or when such a @@ -2013,7 +2013,7 @@ - + The wl_pointer interface represents one or more input devices, such as mice, which control the pointer location and pointer_focus @@ -2426,7 +2426,7 @@ - + The wl_keyboard interface represents one or more keyboards associated with a seat. @@ -2461,6 +2461,10 @@ From version 7 onwards, the fd must be mapped with MAP_PRIVATE by the recipient, as MAP_SHARED may fail. + + From version 10 onwards, if the wl_keyboard has an active surface + immediately before this event, the compositor must send modifiers and + keys events immediately after this event. @@ -2588,9 +2592,23 @@ + + + + + + Notifies the client that the set of logically down keys has changed. + + In the wl_keyboard logical state, this event replaces the keys currently + logically down. The compositor must not send this event if the + wl_keyboard did not have an active surface immediately before this + event. + + + - + The wl_touch interface represents a touchscreen associated with a seat.