Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

plugins: input-raw: Parse BTN_LEFT in MT mode #218

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

dsemkowicz-tt
Copy link
Contributor

Some devices, like eGalax USB HID touch panel, emulate a mouse device. In such case, BTN_LEFT instead of BTN_TOUCH event is read from evdev input. This case is already covered in ts_input_read(), but not in the ts_input_read_mt(). As ts_uinput tool always uses multitouch mode, such devices do not register touch events correctly.

Handle BTN_LEFT in the same way as BTN_TOUCH is handled to fix this problem. This will now be common with ts_input_read() implementation.

Some devices, like eGalax USB HID touch panel, emulate a mouse device.
In such case, BTN_LEFT instead of BTN_TOUCH event is read from evdev
input. This case is already covered in `ts_input_read()`, but not in the
`ts_input_read_mt()`. As `ts_uinput` tool always uses multitouch mode,
such devices do not register touch events correctly.

Handle BTN_LEFT in the same way as BTN_TOUCH is handled to fix this
problem. This will now be common with `ts_input_read()` implementation.

Signed-off-by: Daniel Semkowicz <dse@thaumatec.com>
@dsemkowicz-tt
Copy link
Contributor Author

Hello @merge, Are there any obstacles to merging this change into master?

@merge
Copy link
Member

merge commented Oct 9, 2024

I'm not sure about whether we can or should do this by default. as part of a hardware-quirk, it would be ok for sure

@dsemkowicz-tt
Copy link
Contributor Author

If I understand the code correctly, the same behaviour is already implemented for single touch: https://github.com/libts/tslib/blob/master/plugins/input-raw.c#L373.

Regarding a hardware-quirk approach, do you mean to implement the fix in the Linux kernel or tslib?

@merge
Copy link
Member

merge commented Oct 9, 2024

true, but ts_read() is really a different API

I mean if you'd detect your device in get_special_device() ( and #define YOUR_DEVICE 3) and say sth like


case BTN_LEFT
    if (i->special_device != YOUR_DEVICE)
        continue;

(just as an idea), we could definitely merge that

@dsemkowicz-tt
Copy link
Contributor Author

Ok, I will try to change implementation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants