tslib icon indicating copy to clipboard operation
tslib copied to clipboard

plugins: input-raw: Parse BTN_LEFT in MT mode

Open dsemkowicz-tt opened this issue 1 year ago • 5 comments
trafficstars

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.

dsemkowicz-tt avatar Jan 30 '24 07:01 dsemkowicz-tt

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

dsemkowicz-tt avatar Sep 26 '24 08:09 dsemkowicz-tt

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

merge avatar Oct 09 '24 05:10 merge

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?

dsemkowicz-tt avatar Oct 09 '24 05:10 dsemkowicz-tt

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

merge avatar Oct 09 '24 06:10 merge

Ok, I will try to change implementation.

dsemkowicz-tt avatar Oct 09 '24 06:10 dsemkowicz-tt