Skip to content

Commit 9abd04a

Browse files
author
Jiri Kosina
committed
HID: elo: clear BTN_LEFT mapping
ELO devices have one Button usage in GenDesk field, which makes hid-input map it to BTN_LEFT; that confuses userspace, which then considers the device to be a mouse/touchpad instead of touchscreen. Fix that by unmapping BTN_LEFT and keeping only BTN_TOUCH in place. Signed-off-by: Jiri Kosina <[email protected]>
1 parent 20df157 commit 9abd04a

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

drivers/hid/hid-elo.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,12 @@ static int elo_input_configured(struct hid_device *hdev,
4242
{
4343
struct input_dev *input = hidinput->input;
4444

45+
/*
46+
* ELO devices have one Button usage in GenDesk field, which makes
47+
* hid-input map it to BTN_LEFT; that confuses userspace, which then
48+
* considers the device to be a mouse/touchpad instead of touchscreen.
49+
*/
50+
clear_bit(BTN_LEFT, input->keybit);
4551
set_bit(BTN_TOUCH, input->keybit);
4652
set_bit(ABS_PRESSURE, input->absbit);
4753
input_set_abs_params(input, ABS_PRESSURE, 0, 256, 0, 0);

0 commit comments

Comments
 (0)