您的位置:首页 > 运维架构 > Linux

Linux-Touchscreen Driver for X

2012-03-22 15:19 459 查看
Evtouch is a Touchscreen-Driver for X. This site contains the configuration and installation description as well as the possibility to download the driver.

Installation/Configuration

Download the tarball and extract it to some temporary directory. tar xzvf evtouch-xx.yy.tar.gz Copy the file "evtouch_drv.so" to the appropriate location (Some distributions use "/usr/X11R6/lib/modules/input" or "/usr/lib/xorg/modules/input/" (for Ubuntu)). Insert the lines below to the file "/etc/X11/XF86Config-4" or "/etc/X11/xorg.conf". Section "InputDevice"
Identifier "touchscreen"
Driver "evtouch"
Option "Device" "/dev/input/event1"
Option "DeviceName" "touchscreen"
Option "MinX" "98"
Option "MinY" "43"
Option "MaxX" "940"
Option "MaxY" "925"
Option "ReportingMode" "Raw"
Option "Emulate3Buttons"
Option "Emulate3Timeout" "50"
Option "SendCoreEvents" "On"
EndSection

Beware that some distributions use other names for the device. Some use "/dev/input/evdevX" and others use "/dev/input/eventX".
Add the line below to the file "/etc/X11/XF86Config-4" or "/etc/X11/xorg.conf" to the section "ServerLayout".
InputDevice "touchscreen" "CorePointer"
If your Y-axis is interchanged you might have used the wrong event-device. Maybe you should try the next few event-devices (/dev/event[1-9]).
Since Xorg 7.2 there is always a default-mouse-pointer which will run simultaneously with evtouch if you do not prevent it from loading. It is extremely important that you add the following to your configuration. Otherwise you will get double click events and all kind of strange things. Add the following new input-device to your xorg.conf: Section "InputDevice"
Identifier "dummy"
Driver "void"
Option "Device" "/dev/input/mice"
EndSection

Add the following line your your "ServerLayout"-section: InputDevice "dummy"
Calibration is also supported since V0.6.0. You can also reuse your settings from the old driver for the 2.6 driver. Actually you only have to exchange the driver name in the "Inputdevice"-section from "lbtouch" to "evtouch" and change the "Device".

Button-Events

With the state-machine based code you can have the three types of button actions (button up, down, click) which are issued in different states of the state-machine. So the complete behaviour is configurable. Have a look at Libtouch to see which default-actions are hard-coded in the driver and what you have to do to change the default-behaviour.

Advanced Configuration

Changing Timers

If you are not confident with the default behaviour of your touchpanel you can configure certain timers which change its behaviour.
Option Description Default-Value
TapTimer This timer starts when the state MAYBETAPPED is entered. When this timer expires a tap-event is issued and the state changes to UNTOUCHED.200 ms
LongTouchTimer This timer is always started when the state TOUCHED is entered. When the timer expires before you untouch the screen again the state moves to LONGTOUCHED and on entering that state a longtouch-event is issued.400 ms
Emulate3Buttons Enable emulation of three button support true -- enabled
Emulate3Timeout If both buttons are pressed/released before this timer expires a "middle press/release"-event is generated. This timer starts to run as soon as a button is pressed. 50 ms
MoveLimit If the pen moves out of this radius a "mouse-press"-event becomes impossible. 30 Pixels
Rotate There are two valid values:
CW
-- Rotate the screen clockwise
CCW
-- Rotate the screen counter-clockwise
Everything else will be treated as "no rotation".
no rotation
SwapX This option is in the driver since V0.61. When set to 1 the X-axis is swapped. This option is applied BEFORE the rotation-option. false -- no swapping
SwapYThis option is in the driver since V0.61. When set to 1 the Y-axis is swapped. This option is applied BEFORE the rotation-option. false -- no swapping
If you find bugs or if you have comment/wishes please send mail to lifebook@conan.de

Download

Touchscreen-Driver for X

This driver works for Xorg 7.x. XFree 4.x and Xorg 6.8.x. should also work but these Versions are not tested anymore -- please report bugs
Have a look at the CHANGELOG.
V0.8.2 was removed since it was broken -- sorry for the inconvenience.

V0.8.4 contains udev-rules for dynamically creating a softlink to the "correct" device. Please feel free to add your rules to this file and send the patches to me.
Precompiled driver for X V0.8.8evtouch-0.8.8.tar.gz
Precompiled driver for X V0.8.7evtouch-0.8.7.tar.gz
Precompiled driver for X V0.8.6evtouch-0.8.6.tar.gz
Precompiled driver for X V0.8.5evtouch-0.8.5.tar.gz
Precompiled driver for X V0.8.4evtouch-0.8.4.tar.gz
Precompiled driver for X V0.8.3evtouch-0.8.3.tar.gz
Precompiled driver for X V0.8.1evtouch-0.8.1.tar.gz
Precompiled driver for X V0.8.0evtouch-0.8.0.tar.gz
X driver sources V0.8.8xf86-input-evtouch-0.8.8.tar.bz2
X driver sources V0.8.7xf86-input-evtouch-0.8.7.tar.bz2
X driver sources V0.8.6xf86-input-evtouch-0.8.6.tar.bz2
X driver sources V0.8.5xf86-input-evtouch-0.8.5.tar.bz2
X driver sources V0.8.4xf86-input-evtouch-0.8.4.tar.bz2
X driver sources V0.8.3xf86-input-evtouch-0.8.3.tar.bz2
X driver sources V0.8.1xf86-input-evtouch-0.8.1.tar.bz2
X driver sources V0.8.0evtouch-0.8.0-src.tar.gz
Older (obsolete) versions of the evtouch-driver can be downloaded here本文出自 “prothes blog” 博客,请务必保留此出处http://prothesman.blog.51cto.com/8610862/1411589
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: