配置Trackpoint的中键滚轮功能

本文介绍了如何在使用udev和HAL的现代Linux发行版如Ubuntu 8.10和Fedora 10上配置Trackpoint的中键滚轮功能。默认情况下,中键用于粘贴操作,但可以通过配置使其实现类似Windows的垂直滚动功能。在Ubuntu 10.04 Lucid Lynx中,可以创建/usr/lib/X11/xorg.conf.d/20-thinkpad.conf文件来实现这一配置,并在重启Xorg后生效。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

Configuration using udev and HAL

Modern distributions like Ubuntu 8.10 and Fedora 10 use udev and HAL to configure the input devices. You should no longer make changes to xorg.conf as by default Xorg (through the evdev driver) will let the kernel now handle input devices.

But before you get started on this you should make sure you have all the updates applied from your distro vendor as both Ubuntu 8.10 and Fedora 10 require some additional fixes that you will need.

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, 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|Composite TouchPad / TrackPoint"
	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).

NOTE!
For Ubuntu 10.10 Maverick Meerkat, the correct path is /usr/share/X11/xorg.conf.d
NOTE!
For Arch Linux or Fedora, the correct path is /etc/X11/xorg.conf.d
NOTE!
If the above does not work for you, you may need to add a different MatchProduct string. Use
find /dev/input/event* -exec udevadm info --attribute-walk --name={} /; | grep -e product -e name | sort -u
to get a list of possibilities.
NOTE!
If the above directory doesn't exist by default in your distribution, it probably doesn't support this method. In this case, please refer to the udev or xinput method below.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值