Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 09 Nov 2011 13:10:20 -0800
From:      Chuck Swiger <cswiger@mac.com>
To:        Michael Cardell Widerkrantz <mc@hack.org>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: X server and xinit works excellent....almost.
Message-ID:  <30329CB5-03FA-4717-81E6-43CC9CE43713@mac.com>
In-Reply-To: <86pqh1njww.fsf@kropotkin.hack.org>
References:  <4EB88225.9020702@bredband.net> <alpine.BSF.2.00.1111080806260.70888@wonkity.com> <20111108205600.7a8e0205.freebsd@edvax.de> <alpine.BSF.2.00.1111081321010.72738@wonkity.com> <alpine.BSF.2.00.1111081331150.72921@wonkity.com> <20111108215114.24d336e6.freebsd@edvax.de> <4EBA5EBD.7020501@bredband.net> <86pqh1njww.fsf@kropotkin.hack.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Hi--

On Nov 9, 2011, at 12:02 PM, Michael Cardell Widerkrantz wrote:
>> And should HAL have discovered my swedish keyboard automatically in
>> the first place, so there was something going wrong there?
> 
> How would HAL know that the keyboard had a Swedish layout? No such
> information is sent through USB or PS/2 when you attach a keyboard.

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.  For example, see:

  http://www.linux-usb.org/usb.ids

At the moment, I happen to be using a:

Apple Pro Keyboard:
  Product ID: 0x020b
  Vendor ID: 0x05ac  (Apple Inc.)
  Version:  4.20
  Speed: Up to 12 Mb/sec
  Manufacturer: Mitsumi Electric
  Location ID: 0x3d111300 / 6
  Current Available (mA): 250
  Current Required (mA): 50

...and this database would correctly let the system know that I'm using US layout:

  020b  Pro Keyboard [Mitsumi, A1048/US layout]

If you figure out that a Logitech Tangentbord K120 (or an Apple MC184S) is connected, then you've got a Swiss keyboard, and so forth.

Regards,
-- 
-Chuck




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?30329CB5-03FA-4717-81E6-43CC9CE43713>