Does touchpads have buttons?
Peter Hutterer
peter.hutterer at who-t.net
Mon Sep 29 01:04:01 PDT 2008
On Mon, Sep 29, 2008 at 09:42:22AM +0200, Søren Hauberg wrote:
> I'm trying to differentiate touchpads from touchscreens in the evdev
> driver. Both types of devices has absolute axis, and emit the
> BTN_TOUCH signal. So, I need something else to tell them apart.
> Unfortunately, I don't have access to a touchpad (the only one I have
> is broken), so I can't figure out if such a device has other
> interesting properties. So, my question is: does touchpads have
> buttons, i.e. do they emit BTN_LEFT? Touchscreens don't (at least the
> ones using the 'usbtouchscreen' kernel module doesn't), so I might be
> able to use this as a differentiator.
Here's the output of my touchpad, it advertises LMR button.
I'd say that most if not all touchpads have a physical button too, so no button would probably be a good indicator for a touchscreen.
whot at taz:~$ sudo ./evtest /dev/input/event5
Input driver version is 1.0.0
Input device ID: bus 0x11 vendor 0x2 product 0x7 version 0x81b1
Input device name: "SynPS/2 Synaptics TouchPad"
Supported events:
Event type 0 (Sync)
Event type 1 (Key)
Event code 272 (LeftBtn)
Event code 273 (RightBtn)
Event code 274 (MiddleBtn)
Event code 325 (ToolFinger)
Event code 330 (Touch)
Event code 333 (Tool Doubletap)
Event code 334 (Tool Tripletap)
Event type 3 (Absolute)
Event code 0 (X)
Value 1
Min 1472
Max 5472
Event code 1 (Y)
Value 5855
Min 1408
Max 4448
Event code 24 (Pressure)
Value 0
Min 0
Max 255
Event code 28 (Tool Width)
Value 0
Min 0
Max 0
Testing ... (interrupt to exit)
Cheers,
Peter
More information about the xorg
mailing list