keycodes all off by one with GTK and $DISPLAY pointing to an R5 server
kean at armory.com
Sun Sep 18 12:33:38 PDT 2005
> I think the real fix is for the rest of the key handling code to work
> with any keysyms_per_keycode setting.
> The fix might be as simple as fixing KEYSYM_INDEX.
> According to §12.7 of the ICCCM:
> If the list (ignoring trailing NoSymbol entries) is a triple
> of KeySyms ``K1 K2 K3'', then the list is treated as if it
> were the list ``K1 K2 K3 NoSymbol''.
> The get_symbol() function seems to have the correct logic:
> index = KEYSYM_INDEX(keymap_x11, group, level);
> if (index > keymap_x11->keysyms_per_keycode)
> return NoSymbol;
> I suspect that the overflow test should be moved into KEYSYM_INDEX
The attached patch does what you suggest, and I have proven
fixes this bug. Good call. By the way, there is actually a
bug in get_symbol too. The test should be >=, not >, because
its a zero-based index. The patch below refelcts this.
Thanky ou and Owen and everyone else for their help with
this. I greatly appreciate it.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
More information about the xorg