From 1b0d45e9c6bc05399092f50b6c27bcdb43869e58 Mon Sep 17 00:00:00 2001 From: Andri Yngvason Date: Wed, 21 Feb 2024 21:43:36 +0000 Subject: [PATCH] Add wl_keyboard key repeat events This allows the compositor to take over the responsibility of repeating keys. Signed-off-by: Andri Yngvason --- protocol/wayland.xml | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/protocol/wayland.xml b/protocol/wayland.xml index 3b279a0b..e0a67380 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. @@ -2508,9 +2508,18 @@ Describes the physical state of a key that produced the key event. + + Since version 10, the key can be in a "repeated" pseudo-state which + means the same as "pressed", but is used to signal repetition in the + key event. + + The key may only enter the repeated state after entering the pressed + state and before entering the released state. This event may be + generated multiple times while the key is down. + @@ -2533,6 +2542,11 @@ compositor must not send this event if state is pressed (resp. released) and the key was already logically down (resp. was not logically down) immediately before this event. + + Since version 10, compositors may send key events with the "repeated" + key state when a wl_keyboard.repeat_info event with a rate argument of + 0 has been received. This allows the compositor to take over the + responsibility of key repetition. @@ -2593,7 +2607,7 @@ - + The wl_touch interface represents a touchscreen associated with a seat.