Redirect keys not sending XKB_STATE_NOTIFY
@sardemff7
Submitted by Quentin Glidic Assigned to Xorg Project Team
Link to original bug (#104323)
Description
While working on rofi[1] to port it to libxkbcommon, we had several regressions for uncommon XKB features. One of them is key redirects[2], that should actually happen entirely in the X server, but some detail kind of leaked.
In the linked issue, the user is using a keymap where AltGr+S triggers Left (the key labeled S, it’s not S in the keymap). But there is no XKB_STATE_NOTIFY event sent before the KEY_PRESS event, while the latter does carry the updated state (no AltGr). I currently work around that by calling xkb_state_update_mask() with the KEY_PRESS state (and setting it back right after I get the keysym). I spoke with a libxkbcommon developer, and he believes the X server is supposed to send an XKB_STATE_NOTIFY to properly update the mask without the KEY_PRESS state trick.
Thanks,
[1] https://github.com/DaveDavenport/rofi [2] https://github.com/DaveDavenport/rofi/issues/611