Skip to content
Snippets Groups Projects
Commit 9abd04af authored by Jiri Kosina's avatar Jiri Kosina
Browse files

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: default avatarJiri Kosina <jkosina@suse.cz>
parent 20df1578
No related branches found
No related tags found
No related merge requests found
...@@ -42,6 +42,12 @@ static int elo_input_configured(struct hid_device *hdev, ...@@ -42,6 +42,12 @@ static int elo_input_configured(struct hid_device *hdev,
{ {
struct input_dev *input = hidinput->input; struct input_dev *input = hidinput->input;
/*
* 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.
*/
clear_bit(BTN_LEFT, input->keybit);
set_bit(BTN_TOUCH, input->keybit); set_bit(BTN_TOUCH, input->keybit);
set_bit(ABS_PRESSURE, input->absbit); set_bit(ABS_PRESSURE, input->absbit);
input_set_abs_params(input, ABS_PRESSURE, 0, 256, 0, 0); input_set_abs_params(input, ABS_PRESSURE, 0, 256, 0, 0);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment