I’m going Multi-Touch2 December 2009
This is one of the hottest topics of the moment: Multi-Touch (see the trends here). Every review of the just released Qt 4.6 mentions the Touch-and-Gestures framework and KDE is getting ready to use the technology — still it doesn’t work on X11 (yet).
MultiTouch can be Fun !
I couldn’t resist, so for 99€ (120$) I bought a Bamboo Fun Pen & Touclh tablet. I find this really affordable, since you get: A. the precision of a graphics tablet (with 1024 pressure levels, back eraser, etc..) and B. a real 2-Pointers input device!
I tried the tablet on vista, with the latest drivers and the bundled applications bot I got disappointed because:
1. the scroll gesture is remapped to the mouse wheel.. so you lose all the ‘analog’ fun and it feels unconfortable.
2. the zoom gesture is remapped to CTRL+wheel, awkward fixed-steps again.
3. the rotate gesture is not supported by any app even the bundled ones i tried.
In the end I thought this was not “multi-touch”, but some silly gesture-detection broken hardware. I was wrong.
Linux to the rescue
Step 1. After loading the wacom.ko module (updated with this patch) the Linux kernel prints out stuff like this:
[default ] data: 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [finger 1 ] data: 02 00 7d 80 fe 00 8a 80 fc 00 87 00 00 00 00 00 81 11 00 00 [finger 1+2] data: 02 00 ae 80 b6 00 72 81 08 00 70 87 81 5b 00 72 81 21 00 00 [finger 2] data: 02 00 00 00 00 00 00 81 59 00 b4 6d 81 59 00 ba 80 11 00 00
Can you see it ? This is a 2-finger device!
Step 2. The Kernel understands the data and splits it into 2 input devices that Udev maps to /dev/input/wacom and /dev/input/wacom-touch. From here you can read higher level information for each finger such as the decoded position, pressure, click type (tap, doubletab), and more.
I WANT QTouchEvents AND QGestures !!
I do too And I wanted to hack something about that. But I stopped here:
We get the input from evdev and the Application needs QTouchEvents and QGestures, so the easy way would be to hack up a touchpoint feeder to the Qt framework that directly reads from evdev (evdev -> qt). This would work fine for 1 application, but what about two? And what about moving the X cursor too? I think evdev->Xdriver->XInput2->qt is the solution, but we must be sure that no valuable information is lost in the chain, that the event filtering is done in the right place and obviously, that the X driver does a good job. Unfortunately xf86-input-wacom (X input driver for wacom’s kernel driver) doesn’t support my Bamboo Fun Touch & Pen yet and moreover I don’t see MPX support in the sources, so I’m wondering how far away is the Qt multi-touch backend from seeing the light.
I don’t know which way the multi-touch will happen on linux, but I know for sure that we want to play with gestures and we want it soon
For more information: