On Sat, 2008-05-24 at 10:58 +0200, Andreas Hübner wrote:
> I did have a very minor issue with ion3 when using alternate xkb groups.
> You may want to read the bug report I filed in the DBTS, if you are
> interested in this.
> [http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=414974]
> 
> Summary (from someone who is not really familiar with X programming):
> X sets some additional bits in the XKeyEvent.state when you use an
> alternate xkb group.

Good work.  I looked into the Xkb header and found this:

    /*
     * BuildCoreState: Given a keyboard group and a modifier state,
     *                 construct the value to be reported an event.
     * GroupForCoreState:  Given the state reported in an event,
     *                 determine the keyboard group.
     * IsLegalGroup:   Returns TRUE if 'g' is a valid group index.
     */
#define XkbBuildCoreState(m,g)  ((((g)&0x3)<<13)|((m)&0xff))
#define XkbGroupForCoreState(s) (((s)>>13)&0x3)
#define XkbIsLegalGroup(g)      (((g)>=0)&&((g)<XkbNumKbdGroups))

So bits 13 and 14 of the modifiers together are the group number, and
should be ignored when looking up key bindings.  Your patch does that
much.  I wonder whether evil_grab_key() also needs to handle them?

Ben.

-- 
Ben Hutchings
It is easier to change the specification to fit the program than vice versa.

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to