|
From: Chris B. <ch...@cn...> - 2012-12-04 21:19:29
|
On Mon, Dec 3, 2012 at 3:14 PM, Maximilian Federle < max...@go...> wrote: > Am 03.12.2012 21:18, schrieb Ping Cheng: > > > I do not think faking x/y values is a good way to go. Once there are > > more than two fingers, we only get a bounding box with number of touches. > > > > If your interest is mainly in gestures, modifying the kernel driver to > > report touches as ABS_TOOL_*TAP events for all five fingers and let > > xf86-input-synaptics driver take care of your device can be a solution. > > Again, someone has to work on the code. > > I see where this is going. I might have found a new hobby... ;-) > > Here is some more info for you if your interested in continuing forward. According to the E6 definition in wacom_wac.c, this has a touch packet size of WACOM_PKGLEN_TPC2FG; which is 14. Thats small and tells me it probably only has 2 finger touch worth of data in it. See details on older Bamboo packet which is size of 20 and tries to squeeze in some extra touch data. http://sourceforge.net/apps/mediawiki/linuxwacom/index.php?title=USB_Protocol When you touch more than 2 points, the hardware has 2 main options. It either reports 1st 2 touches and tracks those 2 points *or* it reports a bounding box of 2 outer most touch points. You can install the "evtest" program, switch to a text console, and monitor the kernel input device to get a feel for what hardware is reporting during finger touch transitions. At top of USB_Protocol page is some instructions on monitoring USB packets. You could monitor those while doing various touches and see if anything in the data seems to be reporting a count of total touches. I suspect nothing does report that. Once thats been confirmed, your only choice left is to track the width of the bounding box from touches and gestimate # of fingers based on boxes width. My guess is the packet contains some extra data like touch area coverage so you can detect difference between 2 finger pinch gesture vs. 4 finger swipe. If not then you have to gestimate based on width change over time; which introduces a terrible lag. Anyways, this is all very complex to be doing inside device driver and the direction they went with Syntapics linux drivers is to have these type of devices to declare an INPUT_PROP_SEMI_MT property; which means it reports a bounding box of 2 outer most touches and userland can only do an approximation of gestures. I've not seen any userland gesture engines handling these devices yet. Good luck, Chris |