aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/input/hid-input.c
diff options
context:
space:
mode:
authorStelian Pop <stelian@popies.net>2005-09-05 01:57:33 -0500
committerDmitry Torokhov <dtor_core@ameritech.net>2005-09-05 01:57:33 -0500
commite875ce374759087771313c9e76b672b86ac20950 (patch)
tree210817d04ad7fd69bbbbb88aba9d5375e39aa828 /drivers/usb/input/hid-input.c
parent61cdecd9f5f602775af1e89c200179d093a94ae2 (diff)
downloadkernel_samsung_espresso10-e875ce374759087771313c9e76b672b86ac20950.zip
kernel_samsung_espresso10-e875ce374759087771313c9e76b672b86ac20950.tar.gz
kernel_samsung_espresso10-e875ce374759087771313c9e76b672b86ac20950.tar.bz2
Input: HID - add mapping for Powerbook USB keyboard
Map custom HID events (such as the ones generated by some Logitech and Apple Powerbooks USB keyboards) to the FN keycode. Signed-off-by: Stelian Pop <stelian@popies.net> Signed-off-by: Vojtech Pavlik <vojtech@suse.cz> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Diffstat (limited to 'drivers/usb/input/hid-input.c')
-rw-r--r--drivers/usb/input/hid-input.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/drivers/usb/input/hid-input.c b/drivers/usb/input/hid-input.c
index 14acfc5..0b64522 100644
--- a/drivers/usb/input/hid-input.c
+++ b/drivers/usb/input/hid-input.c
@@ -318,10 +318,18 @@ static void hidinput_configure_usage(struct hid_input *hidinput, struct hid_fiel
break;
case HID_UP_MSVENDOR:
- case HID_UP_LOGIVENDOR:
goto ignore;
- case HID_UP_LOGIVENDOR2: /* Reported on Logitech Ultra X Media Remote */
+ case HID_UP_CUSTOM: /* Reported on Logitech and Powerbook USB keyboards */
+
+ set_bit(EV_REP, input->evbit);
+ switch(usage->hid & HID_USAGE) {
+ case 0x003: map_key_clear(KEY_FN); break;
+ default: goto ignore;
+ }
+ break;
+
+ case HID_UP_LOGIVENDOR: /* Reported on Logitech Ultra X Media Remote */
set_bit(EV_REP, input->evbit);
switch(usage->hid & HID_USAGE) {