Ubuntu 10.04下ThinkPad X61中键垂直滚动设置


用ThinkPad的朋友应该都使用过中键垂直滚动的功能吧,就是按住中键,上下滚动小红点,起到滚动条上下滚动的作用。在Windows下leveno有驱动可以直接设置,但在Ubuntu下就没有相关驱动程序了,Ubuntu 10.04默认情况下中键是粘贴功能,但粘贴实际上用处不太大,所以我查找了相关资料把他改成了滚动。

我是X61的机器,估计其它机型也应该适用,反正改动之前做好备份就行了,系统使用的是Ubuntu 10.04.

用root用户创建/usr/lib/X11/xorg.conf.d/20-thinkpad.conf 文件,文件内容为:

Section "InputClass"    
Identifier            "Trackpoint Wheel Emulation"    
MatchProduct        "TPPS/2 IBM TrackPoint|DualPoint Stick|Synaptics Inc. Composite TouchPad / TrackPoint|ThinkPad USB Keyboard with TrackPoint|USB Trackpoint pointing device"    
MatchDevicePath    "/dev/input/event*"    
Option            "EmulateWheel"        "true"     Option            "EmulateWheelButton"    "2"    
Option            "Emulate3Buttons"        "false"    
Option            "XAxisMapping"        "6 7"    
Option            "YAxisMapping"        "4 5"

EndSection 

保存退出,重新启动系统,然后看看效果。应该就没有问题了。

----------------------------------

我把原文也贴出来,如果大家没设置成功的话,也可以再看看原文,不过原文是英文的。

http://www.thinkwiki.org/wiki/How_to_configure_the_TrackPoint

Scrolling 
By default the middle mouse button is that, a middle mouse button, which in Linux is used for the Paste operation.

But you can configure it to act in the same way as in Windows, such that you can use it for vertical scrolling (keep the button pressed and move the TrackPoint up and down to scroll).

xorg.conf.d 
Some distributions now support the new Xorg hotplug configuration method via xorg.conf.d directories (in Ubuntu 10.04 Lucid Lynx) instead of hal. In contrast to the udev method below, (www.bkjia.com)it should be around for some time, so it might be the best way to “statically” configure scrolling.

Create the file /usr/lib/X11/xorg.conf.d/20-thinkpad.conf as root with the following content:

Section "InputClass"    
Identifier            "Trackpoint Wheel Emulation"    
MatchProduct        "TPPS/2 IBM TrackPoint|DualPoint Stick|Synaptics Inc. Composite TouchPad / TrackPoint|ThinkPad USB Keyboard with TrackPoint|USB Trackpoint pointing device"    
MatchDevicePath    "/dev/input/event*"    
Option            "EmulateWheel"        "true"     Option            "EmulateWheelButton"    "2"    
Option            "Emulate3Buttons"        "false"    
Option            "XAxisMapping"        "6 7"    
Option            "YAxisMapping"        "4 5"

EndSection 

Save and restart Xorg (or it'll be enabled at next reboot). a

相关内容