I’m going Multi-Touch

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 technologystill it doesn’t work on X11 (yet).

MultiTouch can be Fun !

Wacom_Bamboo-Fun-smallI 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 :D 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 :D

For more information:

  • Peter Hutterer’s blog. Peter is the MPX (Multi Pointer X) author and plays a big role in the X.org community.
  • X Input Extension 2.0 features.
  • The Linux Wacom project. A community-driven effort to develop kernel and X drivers.

7 comments on “I’m going Multi-Touch

  1. If you want to look at gluon and KCL I think they are doing evdev directly to QT applications at the moment (code still in testing)…. http://gluon.tuxfamily.org/
    MPX is supported by the latest release of Xorg Though I am desperately trying to find a way to make this work with QT. (evdev looks easier at this point).

  2. also I am lead to believe that vista doesn’t do multitouch – Windows 7 does…. Which is why Wacom didn’t release this until after Windows 7 came out

  3. I also bought a bamboo pen&tocuh a few days ago, but i only used in on windows 7 (hmmm works… kinda…) and mac os x (wow! this is how it SHOULD be done!) :)

    i haven’t tried it on linux yet, but i was afraid, that i can only use the pen (l had a graphire before, so i knew there is general wacom support). i hope that linux catches up soon :/

  4. @Boudewijn: it will ;-) can’t wait for that!
    @Danni: the evdev access is cool, but only 1 app at a time (so if the X input driver takes ownership of it.. you’re screwed)
    @summel: I’ll post as soon as it gets to a beta state ;-)
    @Valentin: shipment costs to Italy would have been disadvantageous anyway.. :-|

Comments are closed.