三星Q1-Ultra上触摸屏设备的安装

笔记本/便携移动设备,手机平板等软硬件
回复
ausun
帖子: 65
注册时间: 2007-05-11 9:21

三星Q1-Ultra上触摸屏设备的安装

#1

帖子 ausun » 2008-03-08 2:49

刚刚搞定了Q1U上的触摸屏,跟大家共享一下经验,系统是ubuntu 7.10

下载附件并解压,把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
需要记下“PS/2 Generic Mouse”所对应的mouse1和“Touchkit Touch”对应的mouse2,它们分别是Q1U那个摇杆鼠标和触摸屏。
打开 /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
改为上一步得到的mouse1:

代码: 全选

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
这样的修改在本次使用是没问题的,可是由于重启以后设备对应的事件号可能会改变,也就是说下次启动时那个鼠标可能就不是mouse1了,所以我们要改用稳定的“by-path”值。
执行:

代码: 全选

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
可以看到 mouse1 对应的是 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
2、添加触摸屏设备。上一步已得到它是mouse2,同样换成by-path值。

代码: 全选

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
3、把新添加的evtouch设备加入到ServerLayout中

代码: 全选

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
重启X就可以看到效果了。附件的压缩包里有我的xorg.conf文件供参考。
附件
evtouch.zip
(10.86 KiB) 已下载 142 次
nielinjie
帖子: 28
注册时间: 2007-12-10 20:24

#2

帖子 nielinjie » 2008-03-19 21:40

呵呵。
楼主好阿。我也迷惑了好长一段时间。不过前段时间已经把触摸屏搞定了。
右边那个四方向键呢,楼主有什么想法没?我搞不定。
ausun
帖子: 65
注册时间: 2007-05-11 9:21

#3

帖子 ausun » 2008-03-20 22:03

那几个键我也搞定了。
ubuntu源里类似的软件有xbindkeys和keytouch。试用了一下,xbindkeys根本不能获取那几个特殊按键。keytouch还不错,使用很方便。首先使用keytouch-editor为Q1U生成自己的配置文件,然后在keytouch里import就行了。我把那四个键定义成了浏览用的scroll up、down、前进、后退。一个奇怪的地方就是scroll down不支持重复,就是说按一次动一下,而scroll up却可以。
周伯通
帖子: 7
注册时间: 2009-11-25 19:22

Re: 三星Q1-Ultra上触摸屏设备的安装

#4

帖子 周伯通 » 2009-11-25 23:40

我怎么死活进不去安装界面呢,更甭提这个了

引导以后沙漏没完没了,然后就是failed to restore crtc...,然后平步就变得特别亮,好像要着火了似的,然后光驱也没反应了,按外接的键盘也没动静了,只能按电源开关,提示系统将要halt了,然后就是光驱弹出,关机了。 :em20
头像
eexpress
帖子: 58428
注册时间: 2005-08-14 21:55
来自: 长沙

Re: 三星Q1-Ultra上触摸屏设备的安装

#5

帖子 eexpress » 2009-11-25 23:44

710。。。那经验可能过时了
● 鸣学
回复