<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Enrico Ros &#187; multi-touch</title>
	<atom:link href="http://www.enricoros.com/blog/tag/multi-touch/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.enricoros.com/blog</link>
	<description>Focused ideas, bleeding edge madness and code recipes.</description>
	<lastBuildDate>Sun, 17 Apr 2011 20:51:13 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>I&#8217;m going Multi-Touch</title>
		<link>http://www.enricoros.com/blog/2009/12/im-going-multi-touch/</link>
		<comments>http://www.enricoros.com/blog/2009/12/im-going-multi-touch/#comments</comments>
		<pubDate>Wed, 02 Dec 2009 14:30:45 +0000</pubDate>
		<dc:creator>Enrico Ros</dc:creator>
				<category><![CDATA[Senza categoria]]></category>
		<category><![CDATA[avanguardia]]></category>
		<category><![CDATA[creativity]]></category>
		<category><![CDATA[multi-touch]]></category>
		<category><![CDATA[planetkde]]></category>
		<category><![CDATA[planetqt]]></category>
		<category><![CDATA[qt]]></category>
		<category><![CDATA[x.org]]></category>

		<guid isPermaLink="false">http://www.enricoros.com/blog/?p=407</guid>
		<description><![CDATA[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 &#8212; still it doesn&#8217;t work on X11 (yet). MultiTouch can be Fun ! I couldn&#8217;t resist, so for 99€ (120$) I [...]]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p>This is one of the <em>hottest topics</em> of the moment: <a href="http://en.wikipedia.org/wiki/Multi-touch" target="_blank">Multi-Touch</a> (see the trends <a href="http://www.google.com/trends?q=multitouch" target="_blank">here</a>). Every review of the <a href="http://labs.trolltech.com/blogs/2009/12/01/qt-460-released-early-due-to-good-behaviour/" target="_blank">just released</a> Qt <a href="http://doc.trolltech.com/4.6/">4.6</a> mentions the Touch-and-Gestures framework and KDE is <a href="http://www.notmart.org/index.php/Software/Multitouch_screencast_overload" target="_blank">getting ready to use the technology</a> &#8212; <span style="text-decoration: underline;">still it doesn&#8217;t work on X11</span> (<em>yet</em>).</p>
<h3>MultiTouch can be <em>Fun </em>!</h3>
<p><img class="alignright size-full wp-image-413" title="Wacom_Bamboo-Fun-small" src="http://www.enricoros.com/blog/wp-content/uploads/2009/12/Wacom_Bamboo-Fun-small1.png" alt="Wacom_Bamboo-Fun-small" width="197" height="124" />I couldn&#8217;t resist, so for 99€ (120$) I bought a <em>Bamboo Fun Pen &amp; Touclh</em> 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!</p>
<p>I tried the tablet on vista, with the latest drivers and the bundled applications bot I got disappointed because:<br />
<em>1.</em> <em>the scroll gesture is remapped to the mouse wheel</em>.. so you lose all the &#8216;analog&#8217; fun and it feels unconfortable.<br />
<em>2. the zoom gesture is remapped to CTRL+wheel</em>, awkward fixed-steps again.<br />
<em>3. the rotate gesture is not supported by any app</em> even the bundled ones i tried.</p>
<p>In the end I thought this was not &#8220;multi-touch&#8221;, but some silly gesture-detection broken hardware. <em>I was wrong</em>.</p>
<h3>Linux to the rescue</h3>
<p><a href="http://www.enricoros.com/blog/wp-content/uploads/2009/12/gesture-vortex-2H.png"><img class="size-full wp-image-438 aligncenter" title="gesture-vortex-2S" src="http://www.enricoros.com/blog/wp-content/uploads/2009/12/gesture-vortex-2S1.png" alt="gesture-vortex-2S" width="425" height="299" /></a><br />
<span style="text-decoration: underline;">Step 1</span>. After loading the wacom.ko module (updated with <a href="http://ubuntuforums.org/showthread.php?t=1321238#1" target="_blank">this</a> patch) the Linux kernel prints out stuff like this:</p>
<pre class="brush: plain; title: ; notranslate">
[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
</pre>
<p>Can you see it ? This <strong>is</strong> a 2-finger device! <img src='http://www.enricoros.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p><span style="text-decoration: underline;">Step 2</span>. The Kernel understands the data and splits it into 2 input devices that Udev maps to <em>/dev/input/wacom</em> and <em>/dev/input/wacom-touch</em>. From here you can read higher level information <strong>for each finger</strong> such as the decoded <strong>position</strong>, <strong>pressure</strong>, click type (<strong>tap</strong>, <strong>doubletab</strong>), and more.</p>
<h3>I WANT QTouchEvents AND QGestures !!</h3>
<p>I do too <img src='http://www.enricoros.com/blog/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' />  And I wanted to hack something about that. But I stopped here:</p>
<p><img class="aligncenter size-full wp-image-436" title="schema-problem" src="http://www.enricoros.com/blog/wp-content/uploads/2009/12/schema-problem.png" alt="schema-problem" width="507" height="207" /></p>
<p>We get the input from <em>evdev</em> and the Application needs <a href="http://doc.trolltech.com/4.6/qtouchevent.html" target="_blank">QTouchEvent</a>s and <a href="http://doc.trolltech.com/4.6/qgesture.html" target="_blank">QGesture</a>s, so the easy way would be to hack up a touchpoint feeder to the Qt framework that directly reads from evdev (<strong>evdev -&gt; qt</strong>). This would work fine for 1 application, but what about two? And what about moving the X cursor too? I think <strong>evdev-&gt;Xdriver-&gt;XInput2-&gt;qt</strong> is the solution, but we must be sure that <em>no valuable information is lost in the chain</em>, that the <em>event filtering is done in the right place</em> and obviously, that the X driver does a good job. Unfortunately <a href="http://cgit.freedesktop.org/~whot/xf86-input-wacom/" target="_blank">xf86-input-wacom</a> (X input driver for wacom&#8217;s kernel driver) doesn&#8217;t support my Bamboo Fun Touch &amp; Pen yet and moreover I don&#8217;t see MPX support in the sources, so I&#8217;m wondering how far away is the Qt multi-touch backend from seeing the light.</p>
<h3>Conclusion</h3>
<p>I don&#8217;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 <img src='http://www.enricoros.com/blog/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
<p>For more information:</p>
<ul>
<li>Peter Hutterer&#8217;s <a href="http://who-t.blogspot.com/" target="_parent">blog</a>. Peter is the MPX (Multi Pointer X) author and plays a big role in the X.org community.</li>
<li>X Input Extension 2.0 <a href="http://fedoraproject.org/wiki/Features/XI2" target="_blank">features</a>.</li>
<li>The <a href="http://linuxwacom.sourceforge.net/" target="_blank">Linux Wacom</a> project. A community-driven effort to develop kernel and X drivers.</li>
</ul>
<div class="shr-publisher-407"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><!-- End Shareaholic LikeButtonSetBottom Automatic -->]]></content:encoded>
			<wfw:commentRss>http://www.enricoros.com/blog/2009/12/im-going-multi-touch/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
	</channel>
</rss>

