diff options
author | Stelian Pop <stelian@popies.net> | 2005-09-05 02:57:33 -0400 |
---|---|---|
committer | Dmitry Torokhov <dtor_core@ameritech.net> | 2005-09-05 02:57:33 -0400 |
commit | e875ce374759087771313c9e76b672b86ac20950 (patch) | |
tree | 210817d04ad7fd69bbbbb88aba9d5375e39aa828 /drivers/usb | |
parent | 61cdecd9f5f602775af1e89c200179d093a94ae2 (diff) |
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')
-rw-r--r-- | drivers/usb/input/hid-input.c | 12 | ||||
-rw-r--r-- | drivers/usb/input/hid.h | 4 |
2 files changed, 12 insertions, 4 deletions
diff --git a/drivers/usb/input/hid-input.c b/drivers/usb/input/hid-input.c index 14acfc579f86..0b6452248a39 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 | |||
318 | break; | 318 | break; |
319 | 319 | ||
320 | case HID_UP_MSVENDOR: | 320 | case HID_UP_MSVENDOR: |
321 | case HID_UP_LOGIVENDOR: | ||
322 | goto ignore; | 321 | goto ignore; |
323 | 322 | ||
324 | case HID_UP_LOGIVENDOR2: /* Reported on Logitech Ultra X Media Remote */ | 323 | case HID_UP_CUSTOM: /* Reported on Logitech and Powerbook USB keyboards */ |
324 | |||
325 | set_bit(EV_REP, input->evbit); | ||
326 | switch(usage->hid & HID_USAGE) { | ||
327 | case 0x003: map_key_clear(KEY_FN); break; | ||
328 | default: goto ignore; | ||
329 | } | ||
330 | break; | ||
331 | |||
332 | case HID_UP_LOGIVENDOR: /* Reported on Logitech Ultra X Media Remote */ | ||
325 | 333 | ||
326 | set_bit(EV_REP, input->evbit); | 334 | set_bit(EV_REP, input->evbit); |
327 | switch(usage->hid & HID_USAGE) { | 335 | switch(usage->hid & HID_USAGE) { |
diff --git a/drivers/usb/input/hid.h b/drivers/usb/input/hid.h index 47f75a43a468..ec2412c42f1e 100644 --- a/drivers/usb/input/hid.h +++ b/drivers/usb/input/hid.h | |||
@@ -183,8 +183,8 @@ struct hid_item { | |||
183 | #define HID_UP_PID 0x000f0000 | 183 | #define HID_UP_PID 0x000f0000 |
184 | #define HID_UP_HPVENDOR 0xff7f0000 | 184 | #define HID_UP_HPVENDOR 0xff7f0000 |
185 | #define HID_UP_MSVENDOR 0xff000000 | 185 | #define HID_UP_MSVENDOR 0xff000000 |
186 | #define HID_UP_LOGIVENDOR 0x00ff0000 | 186 | #define HID_UP_CUSTOM 0x00ff0000 |
187 | #define HID_UP_LOGIVENDOR2 0xffbc0000 | 187 | #define HID_UP_LOGIVENDOR 0xffbc0000 |
188 | 188 | ||
189 | #define HID_USAGE 0x0000ffff | 189 | #define HID_USAGE 0x0000ffff |
190 | 190 | ||