有什么方法可以阻止触摸板移动鼠标,但仍然有按钮可以使用 libinput(ubuntu 15.10 带有 xserver-xorg-input-libinput)?在 synaptic 中设置 AreaTopEdge=9999 可以实现相同的效果。
我的环境:
xinput
⎡ Virtual core pointer id=2 [master pointer (3)]
⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)]
⎜ ↳ TPPS/2 IBM TrackPoint id=14 [slave pointer (2)]
⎜ ↳ SynPS/2 Synaptics TouchPad id=13 [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=10 [slave keyboard (3)]
↳ Rapoo Rapoo Wireless Audio id=11 [slave keyboard (3)]
↳ AT Translated Set 2 keyboard id=12 [slave keyboard (3)]
↳ ThinkPad Extra Buttons id=15 [slave keyboard (3)]
root@localhost:/usr/share/X11/xorg.conf.d# xinput list-props 13
Device 'SynPS/2 Synaptics TouchPad':
Device Enabled (142): 1
Coordinate Transformation Matrix (144): 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
libinput Tapping Enabled (279): 0
libinput Tapping Enabled Default (280): 0
libinput Tapping Drag Lock Enabled (281): 1
libinput Tapping Drag Lock Enabled Default (282): 0
libinput Accel Speed (283): 0.000000
libinput Accel Speed Default (284): 0.000000
libinput Natural Scrolling Enabled (285): 0
libinput Natural Scrolling Enabled Default (286): 0
libinput Send Events Modes Available (263): 1, 1
libinput Send Events Mode Enabled (264): 0, 0
libinput Send Events Mode Enabled Default (265): 0, 0
libinput Left Handed Enabled (287): 0
libinput Left Handed Enabled Default (288): 0
libinput Scroll Methods Available (289): 1, 1, 0
libinput Scroll Method Enabled (290): 1, 0, 0
libinput Scroll Method Enabled Default (291): 1, 0, 0
libinput Click Methods Available (292): 1, 1
libinput Click Method Enabled (293): 1, 0
libinput Click Method Enabled Default (294): 1, 0
libinput Disable While Typing Enabled (295): 1
libinput Disable While Typing Enabled Default (296): 1
Device Node (266): "/dev/input/event4"
Device Product ID (267): 2, 7
libinput Drag Lock Buttons (297): <no items>
libinput Horizonal Scroll Enabled (268): 0
Synaptics Off (501): 2
Synaptics Tap Time (742): 1000
请注意,没有 Synaptics Finger 属性。我希望将其设置为 100 次释放、1000 次触摸、200 次按压可以解决我的问题,但没有成功...
答案1
基于迈克尔's comment on your question from Dec 16 '15, 我编写了一个脚本来修补和安装 libinput,以便完全禁用触摸板移动。该脚本可从https://github.com/faf0/thinkpad-scripts/blob/master/16.04/libinput-disable-touchpad-movements.sh。只需克隆 github 存储库,然后执行libinput-disable-touchpad-movements.sh
脚本即可进行安装。不幸的是,我没有找到设置触摸板的 xinput 属性来实现相同结果的方法。
答案2
我通过对源代码中的 libinput 库进行重新编译并做了微小的修改,获得了预期的结果。
文件:
evdev-mt-touchpad-buttons.c
功能:
tp_post_clickpadbutton_buttons()
在每个“按钮”设置为“BTN_LEFT”的位置,将“BTN_LEFT”替换为 0
编译并安装