X server and xinit works excellent....almost.

Chuck Swiger cswiger at mac.com
Thu Nov 10 19:13:13 UTC 2011


On Nov 10, 2011, at 2:25 AM, Michael Cardell Widerkrantz wrote:
>> True for PS/2, but not true for USB-- the USB Vendor & Product ID can
>> identify different keyboard types and let you infer the country.  
> 
> I'm sorry I was unclear. I meant the USB device doesn't say what
> physical keyboard layout it has in any standardized way. There is
> nothing in the USB protocol about it.

That's fairly said-- you'd have to query a database of vendor+product ids and see whether you can determine that a particular keyboard is for a given country and/or language.  If you don't find a match, there isn't a good way of identifying the region of the device just via USB protocol.

> The product ID code might tell you something if you have a large
> database and the USB product ID is indeed different between two physical
> layouts. It might not be. For instance, while ANSI keyboards and ISO
> keyboards are bound to have different USB product IDs because of
> actually physical differences in the number of keys, the only thing that
> differs between, say, a German keyboard and a Swedish keyboard of the
> same model is what is printed on the keycaps. A vendor might see these
> as the same USB product ID.

Different keycaps means a different product SKU, at least.  If they use the same USB product ID, then you're going to have to define a keymap file / xmodmap / etc to associate the scan codes with the right character that's printed on the keycaps.

FreeBSD's users generally are more technically inclined and might be willing to deal with this, but even so, I suspect that most folks would appreciate the system trying to figure out that an AZERTY keyboard layout means French, that JIS means Japanese, that QWERTZ probably indicates German / Swiss / Hungarian, etc.

To my mind, though, that's a fallback for when you have a KVM or a PS/2-to-USB converter or suchlike in the way that prevents the device from being correctly recognized.

Regards,
-- 
-Chuck



More information about the freebsd-questions mailing list