Chinaunix首页 | 论坛 | 博客
  • 博客访问: 521830
  • 博文数量: 197
  • 博客积分: 2071
  • 博客等级: 上尉
  • 技术积分: 1307
  • 用 户 组: 普通用户
  • 注册时间: 2010-11-02 09:49
个人简介

prothes 专注嵌入式的ARM linux

文章分类

全部博文(197)

文章存档

2014年(3)

2013年(16)

2012年(108)

2011年(70)

分类:

2012-03-22 15:19:41

原文地址:Linux-Touchscreen Driver for X 作者:cywcdwxjf

Evtouch is a Touchscreen-Driver for X. This site contains the description as well as the possibility to the driver.

  1. 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
  2. Beware that some distributions use other names for the device. Some use "/dev/input/evdevX" and others use "/dev/input/eventX".
  3. Add the line below to the file "/etc/X11/XF86Config-4" or "/etc/X11/xorg.conf" to the section "ServerLayout".
    InputDevice "touchscreen" "CorePointer"
  4. 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.
  1. Add the following new input-device to your xorg.conf:
    Section "InputDevice"
        Identifier "dummy"
        Driver "void"
        Option "Device" "/dev/input/mice"
    EndSection
  2. 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 to see which default-actions are hard-coded in the driver and what you have to do to change the default-behaviour.

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
SwapY This 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

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 .
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.8
Precompiled driver for X V0.8.7
Precompiled driver for X V0.8.6
Precompiled driver for X V0.8.5
Precompiled driver for X V0.8.4
Precompiled driver for X V0.8.3
Precompiled driver for X V0.8.1
Precompiled driver for X V0.8.0
X driver sources V0.8.8
X driver sources V0.8.7
X driver sources V0.8.6
X driver sources V0.8.5
X driver sources V0.8.4
X driver sources V0.8.3
X driver sources V0.8.1
X driver sources V0.8.0
of the evtouch-driver can be downloaded
阅读(532) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~