Keycodes >0xff
Jim Gettys
Jim.Gettys at hp.com
Tue Jun 14 19:25:35 EEST 2005
On Tue, 2005-06-14 at 18:00 +0200, Josef Spillner wrote:
> Am Dienstag, 14. Juni 2005 17:42 schrieb Jim Gettys:
> > I challenge you to show me a keyboard with more than 248 actual keys on
> > it.
>
> He he.
> Nevertheless keyboard input is still not where it could be. For instance, many
> APIs are not unicode safe and export functionality keys (ctrl, shift, alt)
> together in one list with value keys (a, ä, ó). This leads to inconsistent
> APIs like in Qt or SDL or the Linux kernel, where KEYCODE_A is defined but
> KEYCODE_Ä is (obviously) not.
>
> I routed around the problem in a Qt/embedded port writing my own keysym
> generation code:
> http://www.inf.tu-dresden.de/~js177634/drops/keymap/
> But I do see it as one of the fundamental free desktop principles to unify
> system and desktop keyboard configuration - something which technically
> doesn't exist yet on e.g. many popular Linux distributions, where X11
> keyboards are configured separately from command line keyboards.
> There are now things like SDL_EnableUNICODE() but on the other hand there's
> lots of legacy code out there. If it was me, I'd simply erase the value-based
> definitions from the API and let the apps break compiling until fixed,
> because they're broken on their own in a way.
No argument that unification is not needed.
XFree86 attempted to use a common keyboard driver across platforms: this
results in console and X having different bindings, and a lot of
indirect support costs.
While this may be useful for some platforms, particularly minority
platforms on systems without very competent system interfaces, I suspect
the time has come to try to build platform specific modules for
competent platforms (the Linux keyboard system looked pretty competent
when I looked into it some years ago). The KAA interface takes this
strategy (though is primarily Linux at this date). From it you can see
what a platform specific implementation would look like. It isn't all
that much code.
This is certainly the way keyboard system support worked prior to
XFree86. Life is now much simpler than it used to be, since PC
keyboards are now the norm, and used on most systems. However, kernel
interfaces now differ much more than the keyboards themselves.
Regards,
- Jim
More information about the xdg
mailing list