keycodes all off by one with GTK and $DISPLAY pointing to an R5 server

Kean Johnston kean at
Sat Sep 17 10:38:11 PDT 2005

> One possibility is that it's an Xkb issue. The R5 server won't support
> Xkb, but GTK appears to rely upon it, e.g.:
>   if (keymap_x11->xkb_desc == NULL)
>     {
>       keymap_x11->xkb_desc = XkbGetMap (xdisplay, XkbKeySymsMask | XkbKeyTypesMask, XkbUseCoreKbd);
>       if (keymap_x11->xkb_desc == NULL)
> 	g_error ("Failed to get keymap");
>       XkbGetNames (xdisplay, XkbGroupNamesMask, keymap_x11->xkb_desc);
>     }
> The code in question is guarded by "#ifdef HAVE_XKB", but that's a
> compile-time issue. You don't know whether the server supports Xkb
> until run time.
> I don't know how the Xkb* functions behave if the server doesn't have
> the extension.

Just one further data point (and by the way I already had
looked at teh XKB stuff and was hoping to defer delving too
deeply into it but I may not be that lucky). I recompiled
vim with GTK 1.2.10, and it worked just fine. This is looking
more and more like a GTK issue.


More information about the xorg mailing list