在Arch中,小红点(TrackPoint)支持驱动有两个 – xf86-input-evdev 和 xf86-input-libinput 都支持它。evdev是 Xorg 的默认驱动。从2017-01-14起,xf86-input-libinput作为默认驱动,但是依然支持synaptics, evdev驱动配置. 如果因为升级导致支持驱动自动变为libinput,则可以重新安装evdev驱动然后调整配置文件还原回来.我就是这样的,因为,我考虑到毕竟libinput刚出来可能不是很稳定,再者,之前都是针对evdev的配置,所以不想又挨个儿修改配置,于是继续使用evden作为小红点的配置.
安装驱动xf86-input-evdev
首先,安装xf86-input-evdev
驱动后,默认在/usr/share/X11/xorg.conf.d
下有一个配置文件 - 10-evdev.conf
,大概内容如下:
# # Catch-all evdev loader for udev-based systems # We don't simply match on any device since that also adds accelerometers # and other devices that we don't really want to use. The list below # matches everything but joysticks. Section "InputClass" Identifier "evdev pointer catchall" MatchIsPointer "on" MatchDevicePath "/dev/input/event*" Driver "evdev" EndSection Section "InputClass" Identifier "evdev keyboard catchall" MatchIsKeyboard "on" MatchDevicePath "/dev/input/event*" Driver "evdev" EndSection Section "InputClass" Identifier "evdev touchpad catchall" MatchIsTouchpad "on" MatchDevicePath "/dev/input/event*" Driver "evdev" EndSection Section "InputClass" Identifier "evdev tablet catchall" MatchIsTablet "on" MatchDevicePath "/dev/input/event*" Driver "evdev" EndSection Section "InputClass" Identifier "evdev touchscreen catchall" MatchIsTouchscreen "on" MatchDevicePath "/dev/input/event*" Driver "evdev" EndSection
将这个文件copy到/etc/X11/xorg.conf.d/
下,然后结合synaptics驱动一起控制触摸板[TouchPad]
安装驱动xf86-input-synaptics
同样,安装xf86-input-synaptics后其默认配置文件(70-synaptics.conf
)在`/usr/share/X11/xorg.conf.d/`下, 我们需要将这个配置文件移动到/etc/X11/xorg.conf.d/
目录下,然后才可以生效,内容类似这样:/etc/X11/xorg.conf.d/70-synaptics.conf
|
|
详细配置可以在ArchWiki#Touchpad_Synaptics查看.我的配置如下:/etc/X11/xorg.conf.d/70-synaptics.conf
配置头,例如MatchProduct
可以使用 xinput
命令查看,xinput list
查看touchpad设备名称.如:
$ xinput list
Virtual core pointer id=2 [master pointer (3)]
Virtual core XTEST pointer id=4 [slave pointer (2)]
MLK rapoo 3900 id=10 [slave pointer (2)]
SynPS/2 Synaptics TouchPad id=13 [slave pointer (2)]
TPPS/2 IBM TrackPoint id=14 [slave pointer (2)]
Virtual core keyboard id=3 [master keyboard (2)]
Virtual core XTEST keyboard id=5 [slave keyboard (3)]
Power Button id=6 [slave keyboard (3)]
Video Bus id=7 [slave keyboard (3)]
Video Bus id=8 [slave keyboard (3)]
Sleep Button id=9 [slave keyboard (3)]
Integrated Camera id=11 [slave keyboard (3)]
AT Translated Set 2 keyboard id=12 [slave keyboard (3)]
ThinkPad Extra Buttons id=15 [slave keyboard (3)]
然后, 如果你使用gnome-shell则,可以安装gnome扩展 -TouchpadIndicator, 它可以通过GUI禁用触摸板.一般的,有了小红点触摸板基本就不用了.当然Synaptics
提供了丰富的触摸板个性化配置,
例如,类似Mac触摸板(号称世界上比鼠标还好用的触摸板体验)自然滚动,画圆滚动,打字自动禁用触摸板等等.
随便你配置,但是,假设Mac触摸板的说法是事实(因为我没有体验过),我想非Mac机器上配置触摸板应该达不到Mac那种效果,所以还是以实用为主.其实,在我的世界里,小红点才是世界上最优的鼠标替代者!尤其是对字符编辑者来说尤其是.想想你的双手可以不用键盘鼠标来回的移动.