Since the last week, i’ve done some jobs about supporting nativly multitouch screens in PyMT. Linux was missing in the native support, next to Windows and MacOSX, already available.
2 supports have been realized : HID Input Support, and MPX/XI2 Support.
1. Kernel Part
HID Input is the Input part of Linux Kernel. Since 2.6.34, lot of multitouch screens got their drivers integrated in the source code. Most of the drivers have been done by the Stephane Chatty from the ENAC Laboratory, inside the ShareIT project.
HID Input is reading the Event generated by the kernel, using /dev/input/eventX.
The Event are documented in the input.h. New event type have been added for Multitouch support: all the ABS_MT_. As today, we support :
- ABS_MT_POSITION_X : X position
- ABS_MT_POSITION_Y: Y position
- ABS_MT_PRESSURE : pressure
- ABS_MT_TOUCH_MAJOR : width of the object
- ABS_MT_TOUCH_MINOR : height of the object
Other event are ignored, but would be interested to add the support, like ABS_MT_ORIENTATION. But right now, no device support them.
The result of my work : PyMT + HIDInput support on Linux
Since Xorg 7.5, MPX is available. MPX is the support of Multi Pointer inside X. Benjamin (from the Enac too), have provided a modified evdev module for Xorg, to read Multitouch Event from kernel, and pass them to Xorg.
This work require a running daemon, actually called multitouchd (on the same page as evdev). The daemon detect all the devices with Multitouch support, and create by default 5 fake mouse device, attached to the main multitouch device. With this way, each touch control one fake mouse device.
Unfortunaly, this is not stable, and with a stantum screen, once i get more that 4 or 5 touch, Xorg crash.
Anyway, i’ve start the support in the PyMT branch input-xi2. This rely on python-xlib, but this library required some change to make our work run.
Since it’s really more complicated than HID Input, i’ll not explain all the work right now. Maybe in another blog post.
3. So, which screen i could buy to play with ?
That’s pretty simple. ENAC (again) maintain a full list of multitouch screen working on linux, and the status of the support in linux kernel.
For my part, i’m playing with an Acer T230H. A little bit bugged, and support only 2 points. But enough to play and debug with right now.
That’s all for the moment, enjoy !