On Tue, 2003-08-05 at 10:18, Pablo Saratxaga wrote:
> > It should be possible in Xlib's code for handling
> > lock == Caps_Lock to simply special case this; if the lower case
> > key is 'i', then check to see whether the key in the second level
> > is 'I' or 'Idotabove', and act accordingly.
>
> Such one is a nice idea, it wouldn't even need the introduction of a special
> keyword.
>
> If someone knows where on Xlib code that casing is done, I may take a look
> at it.
It's easy enough to do for non-XKB (xc/lib/X11/KeyBind.c:_XTranslateKey)
but trickier for XKB, which is what we care about. For XKB, the relevant
code is in XKBBind.c:XkbTranslateKeySym().
One with the XKB code is that the people writing it knew
just enough about internationalization to be dangerous; there
is some structure in there for *character set* dependent conversion
of keyboard symbols (which is never right, tr_TR.UTF-8 and
en_US.UTF-8 have the same character set), but if you look deeper,
it actually isn't used; it ends up as a hardcoded call
to XConvertCase() currently. So, this structure can probably
just be ignored.
The other problem is that by the time we get to XkbTranslateKeySym,
we've lost track of what what key was pressed, so you'd probably
need to have an internal variant of XkbTranslateKeySym that
takes keycode information as well, and call that from
XLookupString().
Regards,
Owen
[ Don't try to test this stuff with GTK+; the Xlib code isn't involved
for either non-XKB or XKB. ]
_______________________________________________
Devel mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/devel