lentinj / tp-compact-keyboard

Fn-Lock switcher for ThinkPad Compact Bluetooth Keyboard with TrackPoint
GNU General Public License v2.0
350 stars 33 forks source link

Support for other BT keyboards #21

Closed pasdVn closed 9 years ago

pasdVn commented 9 years ago

I am using a bluetooth keyboard that is sold as "CSL - Ultra Slim Bluetooth Tastatur" in germany (probably some rebranded stuff that is merchandized under a lot of different names).

This keyboard has an Fn-key that is not working with vanilla linux. Additionally Esc an all F[0-9]+ keys are not working. I simply tried your udev script with a little modification (to grep the correct hid device by name) without investigating or sniffing before. Surprisingly it worked and I am abled to use all the keys including switching between ios, android and windows mode :-). So thank you a lot for your work!

Maybe there is a more generic way to identify which bt keyboard uses those commands?

I tried the script with the keyboard at two different machines and had a look at /sys/class/hidraw/hidraw*/device/uevent in the hope that those informations help:

Debian Wheezy, kernel 3.18.7:

DRIVER=hid-generic
HID_ID=0005:000004E8:00007021
HID_NAME=Broadcom Bluetooth Wireless  Keyboard                        
HID_PHYS=00:1a:7d:da:71:02
HID_UNIQ=30:73:00:1f:03:06
MODALIAS=hid:b0005g0001v000004E8p00007021

Ubuntu 14.04, kernel 3.13.0

DRIVER=hid-generic
HID_ID=0005:000004E8:00007021
HID_NAME=Bluetooth 3.0 Keyboard
HID_PHYS=00:02:5b:07:f2:44
HID_UNIQ=30:73:00:1f:03:06
MODALIAS=hid:b0005g0001v000004E8p00007021
´´´´
lentinj commented 9 years ago

This one? https://www.csl-computer.com/shop/product_info.php?products_id=9176

That --fn-lock-enable worked with your keyboard (if that's what you're saying) is interesting, and possibly shows a shared pedigree in the bluetooth chipsets.

The HID Vendor/device ID matches a Samsung keyboard:- http://forum.xda-developers.com/showthread.php?t=2418387 http://www.a4c.com/product/samsung-galaxy-tab-10-1-bluetooth-keyboard-case-bkc-1b1-black.html

...but if it's a no-name keyboard they could have "borrowed" Samsung's vendor/device ID, instead of this actually being a Samsung keyboard. The keyboard certainly doesn't report a specific name. It doesn't seem that sensible to add it to the script as something it recognises. None of the commands I know of result in any responses from the keyboard, so one can't speculatively send commands and see what comes back.