下载附件并解压,把evtouch_drv.so拷贝到相应目录:
代码: 全选
sudo cp evtouch_drv.so /usr/lib/xorg/modules/input
代码: 全选
cat /proc/bus/input/devices
代码: 全选
I: Bus=0017 Vendor=0001 Product=0001 Version=0100
N: Name="Macintosh mouse button emulation"
P: Phys=
S: Sysfs=/class/input/input0
U: Uniq=
H: Handlers=mouse0 event0
B: EV=7
B: KEY=70000 0 0 0 0 0 0 0 0
B: REL=3
I: Bus=0011 Vendor=0001 Product=0001 Version=ab41
N: Name="AT Translated Set 2 keyboard"
P: Phys=isa0060/serio0/input0
S: Sysfs=/class/input/input1
U: Uniq=
H: Handlers=kbd event1
B: EV=120013
B: KEY=4 2000000 3862078 f850d001 feffffdf fbefffff ffffffff ffffffff
B: MSC=10
B: LED=7
I: Bus=0011 Vendor=0002 Product=0001 Version=0000
N: Name="PS/2 Generic Mouse"
P: Phys=isa0060/serio4/input0
S: Sysfs=/class/input/input2
U: Uniq=
H: Handlers=mouse1 event2
B: EV=7
B: KEY=70000 0 0 0 0 0 0 0 0
B: REL=3
I: Bus=0003 Vendor=0a81 Product=0101 Version=0110
N: Name="CHESEN USB Keyboard"
P: Phys=usb-0000:00:1d.0-2/input0
S: Sysfs=/class/input/input3
U: Uniq=
H: Handlers=kbd event3
B: EV=120003
B: KEY=10000 7 ff87207a c14057ff febeffdf ffefffff ffffffff fffffffe
B: LED=1f
I: Bus=0003 Vendor=0a81 Product=0101 Version=0110
N: Name="CHESEN USB Keyboard"
P: Phys=usb-0000:00:1d.0-2/input1
S: Sysfs=/class/input/input4
U: Uniq=
H: Handlers=kbd event4
B: EV=3
B: KEY=20000 3878 d801d101 1e0000 0 0 0
I: Bus=0003 Vendor=0eef Product=0001 Version=0112
N: Name="Touchkit Touch"
P: Phys=usb-0000:00:1d.1-1/input0
S: Sysfs=/class/input/input5
U: Uniq=
H: Handlers=mouse2 event5
B: EV=b
B: KEY=401 0 30000 0 0 0 0 0 0 0 0
B: ABS=f
I: Bus=0019 Vendor=0000 Product=0002 Version=0000
N: Name="Power Button (FF)"
P: Phys=button_power/button/input0
S: Sysfs=/class/input/input6
U: Uniq=
H: Handlers=kbd event6
B: EV=3
B: KEY=100000 0 0 0
I: Bus=0019 Vendor=0000 Product=0001 Version=0000
N: Name="Power Button (CM)"
P: Phys=PNP0C0C/button/input0
S: Sysfs=/class/input/input7
U: Uniq=
H: Handlers=kbd event7
B: EV=3
B: KEY=100000 0 0 0
I: Bus=0019 Vendor=0000 Product=0003 Version=0000
N: Name="Sleep Button (CM)"
P: Phys=PNP0C0E/button/input0
S: Sysfs=/class/input/input8
U: Uniq=
H: Handlers=kbd event8
B: EV=3
B: KEY=4000 0 0 0 0
打开 /etc/X11/xorg.conf 进行修改,一共有三处。
1、修改原来的鼠标对应的设备名称,用mice会使触摸屏动作总是产生双击命令
原来的设备:
代码: 全选
Section "InputDevice"
Identifier "Configured Mouse"
Driver "mouse"
Option "CorePointer"
Option "Device" "/dev/input/mice"
Option "Protocol" "ImPS/2"
Option "ZAxisMapping" "4 5"
Option "Emulate3Buttons" "true"
EndSection
代码: 全选
Section "InputDevice"
Identifier "Configured Mouse"
Driver "mouse"
Option "CorePointer"
Option "Device" "/dev/input/mouse1"
Option "Protocol" "ImPS/2"
Option "ZAxisMapping" "4 5"
Option "Emulate3Buttons" "true"
EndSection
执行:
代码: 全选
ls -l /dev/input/by-path
代码: 全选
lrwxrwxrwx 1 root root 9 2008-03-09 06:25 pci-0000:00:1d.0-usb-0:2:1.0-event-kbd -> ../event3
lrwxrwxrwx 1 root root 9 2008-03-09 06:25 pci-0000:00:1d.0-usb-0:2:1.1-event- -> ../event4
lrwxrwxrwx 1 root root 9 2008-03-09 06:25 pci-0000:00:1d.1-usb-0:1:1.0- -> ../mouse2
lrwxrwxrwx 1 root root 9 2008-03-09 06:25 pci-0000:00:1d.1-usb-0:1:1.0-event- -> ../event5
lrwxrwxrwx 1 root root 9 2008-03-09 06:25 platform-i8042-serio-0-event-kbd -> ../event1
lrwxrwxrwx 1 root root 9 2008-03-09 06:25 platform-i8042-serio-4-event-mouse -> ../event2
lrwxrwxrwx 1 root root 9 2008-03-09 06:25 platform-i8042-serio-4-mouse -> ../mouse1
代码: 全选
Section "InputDevice"
Identifier "Configured Mouse"
Driver "mouse"
Option "CorePointer"
Option "Device" "/dev/input/by-path/platform-i8042-serio-4-mouse"
Option "Protocol" "ImPS/2"
Option "ZAxisMapping" "4 5"
Option "Emulate3Buttons" "true"
EndSection
代码: 全选
Section "InputDevice"
Identifier "touchscreen"
Driver "evtouch"
Option "Device" "/dev/input/by-path/pci-0000:00:1d.1-usb-0:1:1.0-"
Option "SendCoreEvents" "On"
Option "ReportingMode" "Raw"
Option "Emulate3Buttons"
Option "Emulate3Timeout" "50"
Option "MinX" "145"
Option "MinY" "193"
Option "MaxX" "3973"
Option "MaxY" "3898"
Option "TapTimer" "200"
Option "LongTouchTimer" "400"
EndSection
代码: 全选
Section "ServerLayout"
Identifier "Default Layout"
Screen "Default Screen"
InputDevice "Generic Keyboard"
InputDevice "Configured Mouse"
InputDevice "touchscreen" "CorePointer"
# Uncomment if you have a wacom tablet
# InputDevice "stylus" "SendCoreEvents"
# InputDevice "cursor" "SendCoreEvents"
# InputDevice "eraser" "SendCoreEvents"
InputDevice "Synaptics Touchpad"
EndSection