diff options
| author | Hans de Goede <hdegoede@redhat.com> | 2014-01-29 11:57:44 -0500 |
|---|---|---|
| committer | Jiri Kosina <jkosina@suse.cz> | 2014-02-03 05:11:53 -0500 |
| commit | 34e75dca4e6313249c9a2faa8effeddce89b91ac (patch) | |
| tree | e411d609f186d0047fc2028caa897c488cb30705 | |
| parent | 3faed1aff786a007b3ea0549ac469e09f48c98f9 (diff) | |
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>
| -rw-r--r-- | drivers/hid/hid-microsoft.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/drivers/hid/hid-microsoft.c b/drivers/hid/hid-microsoft.c index fe415e8ed7c4..8ba17a946f2a 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, | |||
| 62 | { | 62 | { |
| 63 | struct input_dev *input = hi->input; | 63 | struct input_dev *input = hi->input; |
| 64 | 64 | ||
| 65 | if ((usage->hid & HID_USAGE_PAGE) == HID_UP_CONSUMER) { | ||
| 66 | switch (usage->hid & HID_USAGE) { | ||
| 67 | /* | ||
| 68 | * Microsoft uses these 2 reserved usage ids for 2 keys on | ||
| 69 | * the MS office kb labelled "Office Home" and "Task Pane". | ||
| 70 | */ | ||
| 71 | case 0x29d: | ||
| 72 | ms_map_key_clear(KEY_PROG1); | ||
| 73 | return 1; | ||
| 74 | case 0x29e: | ||
| 75 | ms_map_key_clear(KEY_PROG2); | ||
| 76 | return 1; | ||
| 77 | } | ||
| 78 | return 0; | ||
| 79 | } | ||
| 80 | |||
| 65 | if ((usage->hid & HID_USAGE_PAGE) != HID_UP_MSVENDOR) | 81 | if ((usage->hid & HID_USAGE_PAGE) != HID_UP_MSVENDOR) |
| 66 | return 0; | 82 | return 0; |
| 67 | 83 | ||
