Re: usbkbd not reporting unknown keys

Matheus Izvekov
2006-03-14T23:23:06Z

Hi, i worked on this problem a little bit more today, the following
patch makes jstest usable for me:

--- jstest.c.old 2006-03-14 19:48:36.000000000 -0300
+++ jstest.c 2006-03-14 19:34:53.000000000 -0300
@@ -113,7 +113,8 @@

printf("and %d buttons (", buttons);
for (i = 0; i < buttons; i++)
- printf("%s%s", i > 0 ? ", " : "", button_names[btnmap[i] - BTN_MISC]);
+ if ((btnmap[i] >= BTN_MISC) && (btnmap[i] < sizeof(btnmap)))
+ printf("%s%s", i > 0 ? ", " : "", button_names[btnmap[i]
- BTN_MISC]);
puts(").");

printf("Testing ... (interrupt to exit)\n");

Now i can see it reports a joystick device of 37 axes and 12 buttons.
Ive played with it for a while and the only events i can trigger are
button 7 8 and 9, for left right and middle mouse button respectively.
All the others dont seem to change.

Btw this is the result of cat /proc/bus/input/devices:

I: Bus=0003 Vendor=045e Product=00e3 Version=0053
N: Name="Microsft Microsoft Wireless Optical Desktop# 2.20"
P: Phys=usb-0000:00:02.0-1 /input0
S: Sysfs=/class/input/input0
H: Handlers=kbd event0
B: EV=120003
B: KEY=10000 7 ff800000 7ff febeffdf f3cfffff ffffffff fffffffe
B: LED=7

I: Bus=0003 Vendor=045e Product=00e3 Version=0053
N: Name="Microsft Microsoft Wireless Optical Desktop# 2.20"
P: Phys=usb-0000:00:02.0-1/input1
S: Sysfs=/class/input/input1
H: Handlers=kbd mouse0 js0 event1
B: EV=10000f
B: KEY=c0002 400 0 c000000 1f0001 10f80 78007 ffe739fa d941d7ff
febeffdf ffefffff ffffffff fffffffe
B: REL=fc3
B: ABS=ffffff01 701ff

The joystick in question is ofcourse js0, which is registered together
with the mouse.

So, is this hid-input's fault for registering my mouse as a joystick,
my mouse for reporting its a joystick device, or something else?
If its my mouse's fault, is it possible to blacklist it, and use some
kind of quirk to fix this?

Sorry to send this twice, gmail screwed up the no html subpart rule.