Sic transit gloria keycodi
Andre Majorel
aym-11x at teaser.fr
Thu Aug 26 10:44:22 PDT 2010
On 2010-08-25 08:31 +1000, Peter Hutterer wrote:
> On Tue, Aug 24, 2010 at 08:38:33PM +0200, Andre Majorel wrote:
> > It was apparently decided that evdev should have different
> > keycodes than the usual. I for one welcome our new keycodes, the
> > old ones weren't any good anyway.
> >
> > Now I need a way to query the X server for which keycodes mean
> > what, or at least whether it's the traditional set or the evdev
> > set.
> >
> > Is XGetKeyboardMapping() the way to do that ? Its removal is not
> > in the plans, is it ?
>
> In X, a keycode has no meaning other than being an index into
> the keysym table. Which keycodes are used doesn't matter,
> XGetKeyboardMapping() is the core protocol approach to
> obtaining the keysyms (which are what really matters),
A keycode tells you which key it is. A keysym merely tells you
what it's mapped to today, which is completely irrelevant to my
application.
> or you just use XKB which is a tad more complex but more
> flexible too.
Gave XKB a quick look, ran away and used XGetKeyboardMapping().
It took a few hundred lines of code and the better part of two
days but it works again.
I hope those keycodes were changed for a good reason.
Thank you.
--
André Majorel http://www.teaser.fr/~amajorel/
More information about the xorg
mailing list