patch-2.4.0-test12 linux/drivers/usb/hid.c
Next file: linux/drivers/usb/hub.h
Previous file: linux/drivers/usb/bluetooth.c
Back to the patch index
Back to the overall index
- Lines: 19
- Date:
Tue Nov 28 21:50:07 2000
- Orig file:
v2.4.0-test11/linux/drivers/usb/hid.c
- Orig date:
Sun Nov 19 18:44:16 2000
diff -u --recursive --new-file v2.4.0-test11/linux/drivers/usb/hid.c linux/drivers/usb/hid.c
@@ -856,7 +856,7 @@
case HID_UP_CONSUMER: /* USB HUT v1.1, pages 56-62 */
switch (usage->hid & HID_USAGE) {
-
+ case 0x000: usage->code = 0; break;
case 0x034: usage->code = KEY_SLEEP; break;
case 0x036: usage->code = BTN_MISC; break;
case 0x08a: usage->code = KEY_WWW; break;
@@ -980,6 +980,9 @@
int b = field->logical_maximum;
input_event(input, EV_KEY, BTN_TOUCH, value > a + ((b - a) >> 3));
}
+
+ if((usage->type == EV_KEY) && (usage->code == 0)) /* Key 0 is "unassigned", not KEY_UKNOWN */
+ return;
input_event(input, usage->type, usage->code, value);
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)