[Xorg] is it possible to have keyboard layout detection?

Markus Kuhn Markus.Kuhn at cl.cam.ac.uk
Mon Aug 16 13:03:13 PDT 2004

Kristof Vansant wrote on 2004-08-16 20:50 UTC:
> is it possible to have keyboard layout detection?
> I was wondering if new usb keyboards have some sort of identification
> onboard.

In theory, the USB HID spec does define an integer number to identify
one of a few dozen predefined keyboard layouts. In practice, keyboard
manufacturers leave that field undefined, because they traditionally
used the same microcontroller ROM mask in all their PC keyboards and see
at present no market forces to convince them to add the expense of
paying for either several ROM masks, EEPROM, or wire bridges to tell the
keyboard what its layout is.


Look in the above HID spec at page 22 for the field bCountryCode and at
the table on page 23. Have you ever seen a keyboard that reports there a
value other than 0x00?

Also look at the Hut spec at pages 53-60. USB reinvented something like
keysyms, just much worse! USB HID device descriptor data is all
disappointingly messy, so it is no surprise that nobody bothers
implementing it properly. Have you ever seen a keyboard that contains a
descriptor table, which key has which Unicode character on its keycap?
It would be so nice and simple, wouldn't it?


Markus Kuhn, Computer Lab, Univ of Cambridge, GB
http://www.cl.cam.ac.uk/~mgk25/ | __oo_O..O_oo__

More information about the xorg mailing list