5
votes

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?

1
Not positive, but I believe you need to use the event interface, not the mouse interface.Zan Lynx

1 Answers

2
votes

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