[PATCH] evdev: handle touchscreens without BTN_TOUCH

Peter Hutterer peter.hutterer at who-t.net
Mon May 23 23:53:42 PDT 2011


On Tue, May 24, 2011 at 08:47:58AM +0200, Peter Korsgaard wrote:
> >>>>> "Peter" == Peter Hutterer <peter.hutterer at who-t.net> writes:
> 
> Hi,
> 
>  >> With this change, the only thing differentiating between touchpads and
>  >> touchscreens is the presence of BTN_TOOL_FINGER.
> 
>  Peter> Right, but if I read this correctly, you've removed a condition
>  Peter> and now any device with absolute axes would get labeled as
>  Peter> touchscreen, including keyboards with absolute axes.
> 
>  Peter> before the test was
>  Peter>     if (pressure || touch)
>  Peter>     {
>  Peter>         if (lmr || finger) touchpad
>  Peter>         else touchscreen
>  Peter>     }
> 
>  Peter> whereas now you have 
>  Peter>     if (pressure || touch || !(x/y relative))
>  Peter>     {
>  Peter>         if (finger) touchpad
>  Peter>         else touchscreen
>  Peter>     }
> 
>  Peter> so, any device that doesn't have relative x/y axes will fall into this
>  Peter> branch. there are a few keyboards out there with axes (volume control,
>  Peter> zoom), we probably shouldn't label them as touchscreens.
> 
> Yes, but all of this is in a has abs X/Y check. Keyboards presumably
> don't have absolute X/Y axes?

you'd be surprised :)

$> evtest /dev/input/event3
Input driver version is 1.0.1
Input device ID: bus 0x3 vendor 0x45e product 0xf1 version 0x111
Input device name: "Microsft Microsoft Wireless Desktop Receiver 3.1A"
Supported events:
  Event type 0 (Sync)
    Event type 1 (Key)
    [omitting the keys for brevity]
  Event type 2 (Relative)
    Event code 0 (X)
    Event code 1 (Y)
    Event code 6 (HWheel)
    Event code 7 (Dial)
    Event code 8 (Wheel)
    Event code 9 (Misc)
    Event code 10 (?)
    Event code 11 (?)
  Event type 3 (Absolute)
    Event code 0 (X)
      Value      0
      Min        0
      Max      255
    Event code 1 (Y)
      Value      0
      Min        0
      Max      255
  [omitting other axes for brevity]


Cheers,
  Peter


More information about the xorg-devel mailing list