Patch for bthidd

Maksim Yevmenkin maksim.yevmenkin at savvis.net
Mon Feb 20 20:03:32 PST 2006


Markus,

>>> attached is a patch for bthidd/kbd.c that fixes the scancode
>>> translation table. With this patch all regular keys work now
>>> (including shift, alt, ctrl that didn't work as expected before)
>>> on a Logitech MX5000 keyboard.
>> 
>> thanks for your work. btw, i decided to spend $60 and get myself an
>>  apple bluetooth keyboard. should get it shortly. after that i will
>> try to find some time and polish bthidd(8). than it will be a
>> matter of fixing kbdmux(4) and vkbd(4).
> 
> Great!
> 
>> btw, did you use both kbdmux(4) and vkbd(4) or just vkbd(4) to test
>> this?
> 
> I used kbdmux(4) and vkbd(4) with a PS/2 keyboard and the Logitech
> MX5000. Only thing that didn't work was the key repeat, but I guess
> that belongs into vkbd(4) (According to the HID profile spec, the
> host has to handle this).

hmmm... i think, microsoft bluetooth keyboard did send repeated reports 
when key is pressed and held. i will double check this with apple keyboard.

> Do you have a todo list for kbdmux, vkbd and bthidd?

yes. there are two major issues with kbdmux(4).

1) kbdmux(4) causes hard lockup when ps/2 keyboard added to kbddux(4) 
and ps/2 mouse is used under x11. if i replace ps/2 mouse with usb - no 
problem. my current theory is that kbdmux(4) somehow changes access 
pattern to ps/2 hardware and something gets written into wrong place.

2) alt, ctrl, shift state synchronization. under certain condition 
kbdmux(4) alt, ctrl, shift state may become different from what raw 
keyboard think it is.

vkbd(4) is fine for now, i think. i do not like code duplication in all 
keyboard drivers, but that is another issue.

bthidd(8) is missing man page. it needs to track double click mouse 
events (they work under x11, but not in console). need to fix handling 
for special keys (pause/break). perhaps need to add/fix support for 
multiple bluetooth keyboards. also, i'm not very happy with the 
"keyboard switch script" idea in bthidd(8). if/when kbdmux(4) will 
become default this should go away and appropriate changes to 
/etc/devd.conf should be put in place.

thanks,
max



More information about the freebsd-bluetooth mailing list