Clarify the order of wl_keyboard.modifiers

Consider that we set the modifier for the modifier key as well, and that
you have the option to change your layout when both shifts pressed. This
realized by making the shift keys produce 'Group_switch' when you press
the shift key and the shift modifier is already active. So sending modifier
before the key event will result in 'Group_switch' each time you press
shift.

That being said, the order of modifiers should be updated after the
key/enter event, so it'll only affect future keypresses, not the current one.

See: https://lists.x.org/archives/xorg-devel/2014-July/043110.html

Signed-off-by: Kirill Chibisov <contact@kchibisov.com>
This commit is contained in:
Kirill Chibisov 2020-05-24 02:28:31 +03:00 committed by Daniel Stone
parent a61ae8eca8
commit 4aa6eb868a

View File

@ -2202,6 +2202,9 @@
<description summary="enter event">
Notification that this seat's keyboard focus is on a certain
surface.
The compositor must send the wl_keyboard.modifiers event after this
event.
</description>
<arg name="serial" type="uint" summary="serial number of the enter event"/>
<arg name="surface" type="object" interface="wl_surface" summary="surface gaining keyboard focus"/>
@ -2233,6 +2236,9 @@
A key was pressed or released.
The time argument is a timestamp with millisecond
granularity, with an undefined base.
If this event produces a change in modifiers, then the resulting
wl_keyboard.modifiers event must be sent after this event.
</description>
<arg name="serial" type="uint" summary="serial number of the key event"/>
<arg name="time" type="uint" summary="timestamp with millisecond granularity"/>