Skip to content

Commit

Permalink
HID: hid-microsoft: Add support for 2 reserved usage ids used on ms o…
Browse files Browse the repository at this point in the history
…ffice kb

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
  • Loading branch information
Hans de Goede authored and Jiri Kosina committed Feb 3, 2014
1 parent 3faed1a commit 34e75dc
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions drivers/hid/hid-microsoft.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 34e75dc

Please sign in to comment.