Enabling multitouch in input-evdev

Bradley T. Hughes bradley.hughes at nokia.com
Tue Jan 19 02:12:15 PST 2010


On 01/19/2010 10:37 AM, ext Peter Hutterer wrote:
> On Tue, Jan 19, 2010 at 10:04:53AM +0100, Bradley T. Hughes wrote:
>> On 01/19/2010 09:43 AM, ext Peter Hutterer wrote:
>>>>> given the easy case of a single user interacting with a surface:
>>>>> with Qt as it is now, if you get all the coordinates in a single XI2 event,
>>>>> would that work for you? or is there extra information you need?
>>>>
>>>> That should work. Ideally I would like to also get some kind of
>>>> indication from the device that it is a touch device, and what kind
>>>> of touch device it is (it is a touchscreen or a touchpad? for
>>>> example, we treat them slightly differently).
>>>
>>> Well, given the right axis labels that's the indication then :)
>>
>> Can you give me an example? Right now, I'm struggling with finding
>> out how to get this information from the evdev driver to the client.
>
> as part of InitValuatorAxisStruct, the driver passes in an array of atoms
> specifying the labels for the axes it announced. these are defined in
> xserver-properties.h but are essentially free-form. so you can label them as
> e.g. "Touchpoint1 X", "Touchpoint1 Y" (this needs to be put in the driver,
> the current one doesn't do it).
> you can then have the client ask the driver for the axis labels and if one
> of the multi-touch axes is found, behave accordingly.

Ah, right, now I see it.

> there's no good way to label some device as "touchpad" and one shouldn't do
> so (the driver has to for technical reasons) since chances are likely that
> devices will turn up that are both touchpad and $OTHERDEVICE.

That I understand, and is kind of the situation I'm in with the hardware 
I've got. It does both touch and pen. I'm assuming button labels could also 
be used to indicate when a button press comes from a finger 
(BTN_TOUCH_FINGER) or a pen (BTN_TOUCH_PEN)?

-- 
Bradley T. Hughes (Nokia-D-Qt/Oslo), bradley.hughes at nokia.com
Sandakervn. 116, P.O. Box 4332 Nydalen, 0402 Oslo, Norway


More information about the xorg-devel mailing list