Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 654c192a authored by Ping Cheng's avatar Ping Cheng Committed by Jiri Kosina
Browse files

HID: hid-input: Add eraser usage to hidinput_configure_usage



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: default avatarPing Cheng <ping.cheng@wacom.com>
Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
parent fc5431dc
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -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);