HID: hid-input: Add eraser usage to hidinput_configure_usage
PATCH 1/1 HID: hid-input: Add eraser usage to hidinput_configure_usage
Some tablets report eraser usage to indicate the eraser tool. But, hidinput_configure_usage doesn't support it, which led the usage falls into default as ABS_MISC.
--- drivers/hid/hid-input.c | 4 ++++ 1 file changed, 4 insertions(+)
drivers/hid/hid-input.c +4 -0
@@ -797,6 +797,10 @@ static void hidinput_configure_usage(struct hid_input *hidinput, struct hid_fielmap_key_clear (BTN_STYLUS );break ; +case 0x45 :/* ERASER */ +map_key_clear (BTN_TOUCH ); +break ; +case 0x46 :/* TabletPick */ case 0x5a :/* SecondaryBarrelSwitch */ map_key_clear (BTN_STYLUS2 );
Signature · 1 line
2.13.5
Quoted 14 lines · Ping Cheng
Some tablets report eraser usage to indicate the eraser tool. But,
hidinput_configure_usagedoesn't support it, which led the usage falls into default asABS_MISC.Signed-off-by Ping Cheng <[email protected]>--- drivers/hid/hid-input.c | 4 ++++ 1 file changed, 4 insertions(+)drivers/hid/hid-input.c +0
-0
drivers/hid/hid-input.c static void hidinput_configure_usage(struct hid_input *hidinput, struct hid_fiel · line 801
Quoted 5 lines
drivers/hid/hid-input.c +2
-0@@ -797,6 +797,10 @@ static void hidinput_configure_usage(struct hid_input *hidinput, struct hid_fielmap_key_clear (BTN_STYLUS );break ; +case 0x45 :/* ERASER */ +map_key_clear (BTN_TOUCH );
Surely you mean BTN_TOOL_RUBBER?
Thanks.
Signature · 1 line
Dmitry
Jiri Kosina
maintainerQuoted 21 lines · Ping Cheng
Quoted 21 lines
drivers/hid/hid-input.c static void hidinput_configure_usage(struct
Quoted 14 lines
Some tablets report eraser usage to indicate the eraser tool. But,
hidinput_configure_usagedoesn't support it, which led the usage falls into default asABS_MISC.Signed-off-by Ping Cheng <[email protected] <javascript:;>>--- drivers/hid/hid-input.c | 4 ++++ 1 file changed, 4 insertions(+)drivers/hid/hid-input.c +0
-0@@ -797,6 +797,10 @@ static void hidinput_configure_usage(struct
hid_input*hidinput, structhid_fielQuoted 5 lines
drivers/hid/hid-input.c +2
-0map_key_clear (BTN_STYLUS );break ; +case 0x45 :/* ERASER */ +map_key_clear (BTN_TOUCH );
Quoted 6 lines
Quoted 1 line
Surely you mean
BTN_TOOL_RUBBER?No, I meant
BTN_TOUCHsince INVERT usage decides if an eraser is in proximity and sendBTN_TOOL_RUBBERbit. Eraser usage means it is actually touching the device.
The reasoning makes sense, but it is indeed confusing, so I believe a small comment explaining it would be appropriate. Could you please add it and resend?
Thanks,
Signature · 2 lines
Jiri Kosina SUSE Labs