Skip to content

Commit

Permalink
HID: hid-input: Add eraser usage to hidinput_configure_usage
Browse files Browse the repository at this point in the history
Some tablets report eraser usage to indicate the eraser tool tip
is touching the surface. But, hidinput_configure_usage didn't
support the usage, which led it falls into default as ABS_MISC.

Signed-off-by: Ping Cheng <ping.cheng@wacom.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
  • Loading branch information
Ping Cheng authored and Jiri Kosina committed Oct 5, 2017
1 parent fc5431d commit 654c192
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions drivers/hid/hid-input.c
Original file line number Diff line number Diff line change
Expand Up @@ -797,6 +797,15 @@ static void hidinput_configure_usage(struct hid_input *hidinput, struct hid_fiel
map_key_clear(BTN_STYLUS);
break;

case 0x45: /* ERASER */
/*
* This event is reported when eraser tip touches the surface.
* Actual eraser (BTN_TOOL_RUBBER) is set by Invert usage when
* tool gets in proximity.
*/
map_key_clear(BTN_TOUCH);
break;

case 0x46: /* TabletPick */
case 0x5a: /* SecondaryBarrelSwitch */
map_key_clear(BTN_STYLUS2);
Expand Down

0 comments on commit 654c192

Please sign in to comment.