HID: add extra hotkeys in Asus AIO keyboards
authorKeng-Yu Lin <kengyu@canonical.com>
Thu, 2 Feb 2012 09:31:26 +0000 (10:31 +0100)
committerJiri Kosina <jkosina@suse.cz>
Thu, 2 Feb 2012 09:31:26 +0000 (10:31 +0100)
The Asus All-In-One PC has a wireless keyboard with wifi toggle,
brightness up, brightness down and display off hotkeys.

This patch adds suppoort for these hotkeys.

Signed-off-by: Keng-Yu Lin <kengyu@canonical.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
drivers/hid/hid-chicony.c
drivers/hid/hid-core.c
drivers/hid/hid-ids.h

index 8965ad93d51003c47fd3ac570b897f6ee065de03..4162505793c5cb12d03cc5037db762f7574d584b 100644 (file)
@@ -45,6 +45,10 @@ static int ch_input_mapping(struct hid_device *hdev, struct hid_input *hi,
        case 0xff09: ch_map_key_clear(BTN_9);   break;
        case 0xff0a: ch_map_key_clear(BTN_A);   break;
        case 0xff0b: ch_map_key_clear(BTN_B);   break;
+       case 0x00f1: ch_map_key_clear(KEY_WLAN);        break;
+       case 0x00f2: ch_map_key_clear(KEY_BRIGHTNESSDOWN);      break;
+       case 0x00f3: ch_map_key_clear(KEY_BRIGHTNESSUP);        break;
+       case 0x00f4: ch_map_key_clear(KEY_DISPLAY_OFF); break;
        default:
                return 0;
        }
@@ -53,6 +57,7 @@ static int ch_input_mapping(struct hid_device *hdev, struct hid_input *hi,
 
 static const struct hid_device_id ch_devices[] = {
        { HID_USB_DEVICE(USB_VENDOR_ID_CHICONY, USB_DEVICE_ID_CHICONY_TACTICAL_PAD) },
+       { HID_USB_DEVICE(USB_VENDOR_ID_CHICONY, USB_DEVICE_ID_CHICONY_WIRELESS2) },
        { }
 };
 MODULE_DEVICE_TABLE(hid, ch_devices);
index af08ce7207d972f797d6c2f6d2dbee3c038e0898..75dbe344cabeb745e9d34783ab5ffcfb63e7ea3b 100644 (file)
@@ -1396,6 +1396,7 @@ static const struct hid_device_id hid_have_special_driver[] = {
        { HID_USB_DEVICE(USB_VENDOR_ID_CHERRY, USB_DEVICE_ID_CHERRY_CYMOTION_SOLAR) },
        { HID_USB_DEVICE(USB_VENDOR_ID_CHICONY, USB_DEVICE_ID_CHICONY_TACTICAL_PAD) },
        { HID_USB_DEVICE(USB_VENDOR_ID_CHICONY, USB_DEVICE_ID_CHICONY_WIRELESS) },
+       { HID_USB_DEVICE(USB_VENDOR_ID_CHICONY, USB_DEVICE_ID_CHICONY_WIRELESS2) },
        { HID_USB_DEVICE(USB_VENDOR_ID_CHUNGHWAT, USB_DEVICE_ID_CHUNGHWAT_MULTITOUCH) },
        { HID_USB_DEVICE(USB_VENDOR_ID_CREATIVELABS, USB_DEVICE_ID_PRODIKEYS_PCMIDI) },
        { HID_USB_DEVICE(USB_VENDOR_ID_CVTOUCH, USB_DEVICE_ID_CVTOUCH_SCREEN) },
index b8574cddd95352a360ef7ff67200527185b3c1fb..fb9e61f856665ef4faf8c8076c341067a4f92082 100644 (file)
 #define USB_DEVICE_ID_CHICONY_TACTICAL_PAD     0x0418
 #define USB_DEVICE_ID_CHICONY_MULTI_TOUCH      0xb19d
 #define USB_DEVICE_ID_CHICONY_WIRELESS 0x0618
+#define USB_DEVICE_ID_CHICONY_WIRELESS2        0x1123
 
 #define USB_VENDOR_ID_CHUNGHWAT                0x2247
 #define USB_DEVICE_ID_CHUNGHWAT_MULTITOUCH     0x0001