On Tue Apr 7 21:17:37 2026 +0000, Rémi Bernon wrote:
I think the less we rely on X11 extensions the safer it is. I have no idea how well supported / implemented the Xkb extension is, and if this can work with only standard X11 events it may be better? The group in the KeyEvent state bits is defined in the Xkb specification and should be reliable (and if Xkb isn't available they should either be 0, or we should ignore them): ``` Normally, the Xkb-aware server reports keyboard state in the state member of events such as a KeyPress event and ButtonPress event, encoded as follows: bits meaning 15 0 13-14 Group index 8-12 Pointer Buttons 0-7 Modifiers For Xkb-unaware clients, only core protocol keyboard information may be reported. Because core protocol does not define the group index, the group index is mapped to mod- ifier bits as specified by the groups[group index] field of the compatibility map (the bits set in the compatibility map are ORed into bits 0-7 of the state), and bits 13-14 are reported in the event as zero. ``` Ah, I had missed it. Thanks!
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/10550#note_135647