NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Mapping kbd layout to connected) usb keyboard?

On 2020-10-26 16:41, Mike Pumford wrote:
On 26/10/2020 13:00, Hauke Fath wrote:
Is there a way to automatically set the wscons keyboard layout depending on the keyboard attached? What about X11?

Not sure that's something any OS supports. I've not seen auto layout detection even in windows or linux as I'm not sure the keyboards can communicate that even over USB.

I guessed as much, but I thought I'd ask.

There is usually only one PS/2 keyboard, so that would be distinct; and USB HIDes do have a distinct signature:

[ 172843.427911] wskbd2 at ukbd1 mux 1
[ 172843.427911] wskbd2: connecting to wsdisplay0
[ 172843.427911] uhidev4 at uhub7 port 4 configuration 1 interface 4
[ 172843.427911] uhidev4: Keyboardio (0x1209) Atreus (0x2303), rev 2.00/1.00, addr 3, iclass 3/1
[ 172843.427911] ukbd2 at uhidev4: 8 Variable keys, 6 Array codes
[ 172843.838050] wskbd3 at ukbd2 mux 1
[ 172843.838050] wskbd3: connecting to wsdisplay0

So it would be possible to switch to a separate layout for a newly appeared kbd device. OTOH, this would require per-kbd layouts, which AFAICS wscons does not do...

Normally there is an input selection widget in the UI to switch input keyboard layouts. Not sure if the X11 versions of those work in NetBSD.

I guess. Maybe I'll make do with a small shell script...


     The ASCII Ribbon Campaign                    Hauke Fath
()     No HTML/RTF in email	        Institut für Nachrichtentechnik
/\     No Word docs in email                     TU Darmstadt
     Respect for open standards              Ruf +49-6151-16-21344

Home | Main Index | Thread Index | Old Index