Skip to content

Commit

Permalink
HID: Add Tablet Pick -> BTN_STYLUS2 mapping
Browse files Browse the repository at this point in the history
Many tablet input drivers use BTN_STYLUS2 code to report a second
tablet stylus button. Yet, the generic HID input driver doesn't map it.
Apparently, because there is no corresponding usage in the HID Usage Tables.

This patch selects a compromise usage - "Tablet Pick" (0x46) to be mapped to
BTN_STYLUS2. Some tablets use "Eraser" usage, but mapping it to a button
wouldn't be entirely correct, because the specification says it may be "a
pressure quantity".

Signed-off-by: Nikolai Kondrashov <spbnick@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
  • Loading branch information
Nikolai Kondrashov authored and Jiri Kosina committed Aug 9, 2010
1 parent 73e4008 commit 50b6369
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions drivers/hid/hid-input.c
Original file line number Diff line number Diff line change
Expand Up @@ -336,6 +336,10 @@ static void hidinput_configure_usage(struct hid_input *hidinput, struct hid_fiel
map_key_clear(BTN_STYLUS);
break;

case 0x46: /* TabletPick */
map_key_clear(BTN_STYLUS2);
break;

default: goto unknown;
}
break;
Expand Down

0 comments on commit 50b6369

Please sign in to comment.