summaryrefslogtreecommitdiffstats
path: root/drivers/hid/hid-microsoft.c
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2014-01-29 17:57:44 +0100
committerJiri Kosina <jkosina@suse.cz>2014-02-03 11:11:53 +0100
commit34e75dca4e6313249c9a2faa8effeddce89b91ac (patch)
treee411d609f186d0047fc2028caa897c488cb30705 /drivers/hid/hid-microsoft.c
parent3faed1aff786a007b3ea0549ac469e09f48c98f9 (diff)
downloadop-kernel-dev-34e75dca4e6313249c9a2faa8effeddce89b91ac.zip
op-kernel-dev-34e75dca4e6313249c9a2faa8effeddce89b91ac.tar.gz
HID: hid-microsoft: Add support for 2 reserved usage ids used on ms office kb
Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers/hid/hid-microsoft.c')
-rw-r--r--drivers/hid/hid-microsoft.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/drivers/hid/hid-microsoft.c b/drivers/hid/hid-microsoft.c
index fe415e8..8ba17a9 100644
--- a/drivers/hid/hid-microsoft.c
+++ b/drivers/hid/hid-microsoft.c
@@ -62,6 +62,22 @@ static int ms_ergonomy_kb_quirk(struct hid_input *hi, struct hid_usage *usage,
{
struct input_dev *input = hi->input;
+ if ((usage->hid & HID_USAGE_PAGE) == HID_UP_CONSUMER) {
+ switch (usage->hid & HID_USAGE) {
+ /*
+ * Microsoft uses these 2 reserved usage ids for 2 keys on
+ * the MS office kb labelled "Office Home" and "Task Pane".
+ */
+ case 0x29d:
+ ms_map_key_clear(KEY_PROG1);
+ return 1;
+ case 0x29e:
+ ms_map_key_clear(KEY_PROG2);
+ return 1;
+ }
+ return 0;
+ }
+
if ((usage->hid & HID_USAGE_PAGE) != HID_UP_MSVENDOR)
return 0;
OpenPOWER on IntegriCloud