Skip to content

Specify MODIFIERS to be sent for any state change.

Erik Jensen requested to merge rkjnsn1/libei:modifiers_doc into main

Updates protocol and API documentation to specify that the modifiers event should be sent by the EIS implementation every time the modifier or group state changes, including when the change is triggered by key events on the emulated keyboard.

The previous approach of expecting the client to track modifier state using xkb_state_update_key() for injected keys resulted in multiple opportunities for the client and server to get out of sync (both due to unavoidable race conditions and due the client not having access to the complete state used by the server to calculate state changes), with no way for the client to ensure it had a correct modifier map short of unbinding and rebinding the seat.

The new approach allows the client to track state solely by applying modifiers events with xkb_state_update_mask(), simplifying client implementation. Because the event is sent for all changes, the client can use ei_connection.sync / ei_ping() to ensure that it has received the latest state incorporating all key requests sent prior to the sync request (along with any externally-caused modifier state changes that may have occured up to the time the sync message was received).

Merge request reports

Loading