Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Parsing /dev/input/mouse0 for Multi-Touch

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?

like image 722
mamidon Avatar asked Nov 05 '22 23:11

mamidon


1 Answers

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

like image 86
JonnyRo Avatar answered Nov 09 '22 05:11

JonnyRo