Skip to contentSkip to conversation

HID: hid-input: Add eraser usage to hidinput_configure_usage

PATCH Applied Ping Cheng 2 participants 2 messages Oct 3, 2017 – Oct 5, 2017 HID

lore
Share & tools
lore

Ping Cheng

author
#0 lore raw

PATCH 1/1 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.

---
 drivers/hid/hid-input.c | 9 +++++++++
 1 file changed, 9 insertions(+)
drivers/hid/hid-input.c +9 -0
index 199f6a01fc62..04d01b57d94c 100644
@@ -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);
Signature · 1 line
2.13.6
maintainer Applied
#1 lore raw
Quoted 3 lines · Ping Cheng

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.

Applied to for-4.15/upstream. Thanks,

Signature · 2 lines
Jiri Kosina
SUSE Labs