[PATCH] evdev: handle touchscreens without BTN_TOUCH

Peter Hutterer peter.hutterer at who-t.net
Tue May 24 00:07:36 PDT 2011

On Tue, May 24, 2011 at 08:58:03AM +0200, Peter Korsgaard wrote:
> >>>>> "Peter" == Peter Hutterer <peter.hutterer at who-t.net> writes:
> Hi,
>  >> Yes, but all of this is in a has abs X/Y check. Keyboards presumably
>  >> don't have absolute X/Y axes?
>  Peter> you'd be surprised :)
>  Peter> $> evtest /dev/input/event3
>  Peter> Input driver version is 1.0.1
>  Peter> Input device ID: bus 0x3 vendor 0x45e product 0xf1 version 0x111
>  Peter> Input device name: "Microsft Microsoft Wireless Desktop Receiver 3.1A"
> They can't even spell their own company name?

"I'd like to buy an O please" :)

>  Peter> Supported events:
>  Peter>   Event type 0 (Sync)
>  Peter>     Event type 1 (Key)
>  Peter>     [omitting the keys for brevity]
>  Peter>   Event type 2 (Relative)
>  Peter>     Event code 0 (X)
>  Peter>     Event code 1 (Y)
>  Peter>     Event code 6 (HWheel)
>  Peter>     Event code 7 (Dial)
>  Peter>     Event code 8 (Wheel)
>  Peter>     Event code 9 (Misc)
>  Peter>     Event code 10 (?)
>  Peter>     Event code 11 (?)
>  Peter>   Event type 3 (Absolute)
>  Peter>     Event code 0 (X)
>  Peter>       Value      0
>  Peter>       Min        0
>  Peter>       Max      255
>  Peter>     Event code 1 (Y)
>  Peter>       Value      0
>  Peter>       Min        0
>  Peter>       Max      255
>  Peter>   [omitting other axes for brevity]
> Argh, what then? Check for devices with abs X/Y, no rel X/Y and
> BTN_LEFT? Or do you have other crazy devices doing that as well?

i'm pretty sure that for any combination of axes you can think of, there
will be a device out there that has them. but yes, this keyboard in
particular was the first of many to cause the rel/abs handling in evdev.
If it helps, my other Microsft keyboard has REL_HWHEEL and a bunch of ABS_
axes (including some multi-touch axes, but I'm not sure typing really counts
as MT interaction).

the amendment to your patch wouldn't be hard, you'd just have to make sure
that devices that don't have buttons don't get labelled as touchscreens and
we get your device supported while maintaining the previous behaviour for
all other devices.


More information about the xorg-devel mailing list