Hi Juan, On 21/11/13(Thu) 03:01, Juan Francisco Cantero Hurtado wrote: > http://www.logitech.com/es-es/product/comfort-keyboard-k290?crid=26 > http://i.imgur.com/ZV1GLDt.jpg > > The keyboard has two annoying problems: > - usbhidctl doesn't work. The biggest problem for me. > - Linux and Windows has programs to swap the functionality of the > function keys (F1,F2...) and the windows quick access keys. In this > keyboard, you need to push the FN key to use the traditional F keys > (F1, F2...). The keyboard has an internal functionality to swap this > annoying behavior, it only need to receive the correct message from > the OS. > > I'm really interested in the fix for usbhidctl/uhidaction but it would > nice if someone can adapt the linux programs to OpenBSD to swap the Fn > keys. > > [...] > uhidev0 at uhub3 port 2 configuration 1 interface 0 "Logitech USB Keyboard" > rev 1.10/87.00 addr 2 > uhidev0: iclass 3/1 > ukbd0 at uhidev0: 8 variable keys, 6 key codes > wskbd1 at ukbd0 mux 1 > uhidev1 at uhub3 port 2 configuration 1 interface 1 "Logitech USB Keyboard" > rev 1.10/87.00 addr 2 > uhidev1: iclass 3/0, 5 report ids > uhid0 at uhidev1 reportid 3: input=2, output=0, feature=0 > uhid1 at uhidev1 reportid 4: input=1, output=0, feature=0 > uhid2 at uhidev1 reportid 5: input=0, output=0, feature=5
It might be a bit confusing, but your keyboard is attached as two uhidev(4) devices. Only the first one ``uhidev0'' is recognized as a keyboard. Have you tried usbhidctl(1) on its node: /dev/wskbd1 ? The code needed to swap the F keys is no really complicated to do and I guess you can do it. The idea is to send a magic sequence to the device, there's a lot of code doing that in others drivers. You can take a look at how ugold(4) issues its command or how ukbd(4) blinks its LEDs. All you need to do is match your keyboard by vendor & product in ukbd_attach() and send the reversed engineered command that toggle the key swapping. Please don't hesitate to contact me if you need more help. Martin
