配置Trackpoint的中键滚轮功能
出自Linux Wiki
本文参考了thinkwiki.org中的相关文章,主要是做了翻译,并添加了Fedora Core Linux的解决方案。 Trackpoint指的是Thinkpad笔记本上的指点杆(又常被称为红点)。
目录 |
系统要求
2.6.11以前版本的内核
此段未经测试
2.6.11以前版本的内核中滚动功能可以直接像Windows里一样被驱动。在终端中输入:
# echo -n 1 > /proc/trackpoint/scroll
启用滚动,而用
# echo -n 0 > /proc/trackpoint/scroll
禁用滚动。
2.6.11以后版本的内核
2.6.11以后的内核去掉了原来的相关配置信息,所以只能在X Server中模拟这一功能。
目前实现这一功能需要 "EmulateWheelTimeout" 的支持,但它在Xorg 6.9或7.0的更早版本中不被支持。令人欣慰的是它已经被包含在多数发行版的Xorg版本中,具体情况在http://www.mail-archive.com/devel@xfree86.org/msg03333.html 这里。
Debian/Ubuntu类发行版和Fedora等发行版的设置方法稍有不同,下面分别介绍。
对于其它发行版,如果在/etc/X11/xorg.conf中有Configured Mouse一项,就参照Debian/Ubuntu的设置方法,如果没有,就参照Fedora Core的设置方法。
为避免出现意外,请先备份你的xorg.conf
# cp /etc/X11/xorg.conf /etc/X11/xorg.conf.bak.trackpoint
Debian/Ubuntu等发行版
安装了此项功能,可以在/etc/X11/xorg.conf中,Configured Mouse部分加入:
Option "EmulateWheel" "on" Option "EmulateWheelButton" "2" Option "EmulateWheelTimeOut" "200" Option "YAxisMapping" "4 5" Option "XAxisMapping" "6 7"
以下的配置在我的电脑(IBM R51,1829)上测试通过
Section "InputDevice" Identifier "Configured Mouse" Driver "mouse" Option "CorePointer" Option "Device" "/dev/input/mice" Option "Protocol" "ExplorerPS/2" Option "Emulate3Buttons" "on" Option "Emulate3TimeOut" "50" Option "EmulateWheel" "on" Option "EmulateWheelTimeOut" "200" Option "EmulateWheelButton" "2" Option "YAxisMapping" "4 5" Option "XAxisMapping" "6 7" Option "ZAxisMapping" "4 5" EndSection
重启X,滚轮就可以用了。
Fedora Core等发行版
在Fedora Core等发行版中,/etc/X11/xorg.conf中没有Configured Mouse一项,需要添加:
Section "InputDevice" Identifier "Configured Mouse" Driver "mouse" Option "CorePointer" Option "Device" "/dev/input/mice" Option "Protocol" "ExplorerPS/2" Option "Emulate3Buttons" "on" Option "Emulate3TimeOut" "50" Option "EmulateWheel" "on" Option "EmulateWheelTimeOut" "200" Option "EmulateWheelButton" "2" Option "YAxisMapping" "4 5" Option "XAxisMapping" "6 7" Option "ZAxisMapping" "4 5" EndSection Section "InputDevice" Identifier "Synaptics Touchpad" Driver "synaptics" Option "SendCoreEvents" "true" Option "Device" "/dev/psaux" Option "Protocol" "auto-dev" Option "HorizScrollDelta" "0" Option "SHMConfig" "on" EndSection
在Section "ServerLayout"中,去掉(或注释掉)
InputDevice "Synaptics" "CorePointer"
加入:
InputDevice "Configured Mouse" InputDevice "Synaptics Touchpad"
配置完成(至少在我的R51 1859上好使的),重新启动X就可以看到效果。
Firefox中水平滚动的配置
Firefox中垂直滚动是没有问题的,但是当试图水平滚动时发现执行的是前进、后退操作。如果要修正,请在地址栏中输入 about:config ,回车。更改下列设置:
mousewheel.horizscroll.withcontrolkey.action = 3; mousewheel.horizscroll.withcontrolkey.numlines = 1; mousewheel.horizscroll.withcontrolkey.sysnumlines = true; mousewheel.horizscroll.withnokey.action = 0; mousewheel.horizscroll.withnokey.numlines = 1; mousewheel.horizscroll.withnokey.sysnumlines = true; mousewheel.horizscroll.withshiftkey.action = 1; mousewheel.horizscroll.withshiftkey.numlines = 1; mousewheel.horizscroll.withshiftkey.sysnumlines = true;
你也可以直接做如下更改:
mousewheel.horizscroll.withnokey.action = 0;
--Chenxing 01:10 2007年4月7日 (CST)