I need to enable gesture detection (in userspace) from a multi-touch synaptics touch pad on linux. Reading from the mouse device file (/dev/input/mouse0) for the touchpad, I've figured out that it's the PS/2 protocol.
In short, thats 1 bit for: XY sign and overflow, 3 mouse buttons, and a permanent '1' Followed by 1 byte for the X delta and Y delta.
That totals 3 bytes. But I don't see any way to detect which finger a packet 'belongs' to when more than one finger is on the touch pad. Suggestions?
That's not the right way to do it. The mouse device file you are seeing is emulating a standard mouse.
You will need to detect multi touch events. See:
https://wiki.ubuntu.com/Multitouch/Testing/CheckingMTDevice
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With