我有一台 MSI 笔记本电脑,它的触摸板太宽了。我的右手有一部分放在触摸板上,当我的手摩擦触摸板时,我经常会不小心移动光标。这让我抓狂。
我想禁用触摸板的右边缘。我已经使用了 Gnome Tweaks 中的“键入时禁用触摸板”功能,但这并不能解决问题,因为在我开始键入之前,我的手会摩擦触摸板,从而移动光标。我尝试了您可以禁用触摸板的一部分吗?,但我不相信我的系统使用 Synaptics 驱动程序。
xinput list
⎡ Virtual core pointer id=2 [master pointer (3)]
⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)]
⎜ ↳ PNP0C50:00 06CB:CDAA Mouse id=12 [slave pointer (2)]
⎜ ↳ PNP0C50:00 06CB:CDAA Touchpad id=13 [slave pointer (2)]
⎣ Virtual core keyboard id=3 [master keyboard (2)]
↳ Virtual core XTEST keyboard id=5 [slave keyboard (3)]
↳ Video Bus id=6 [slave keyboard (3)]
↳ Video Bus id=7 [slave keyboard (3)]
↳ Power Button id=8 [slave keyboard (3)]
↳ Sleep Button id=9 [slave keyboard (3)]
↳ Intel HID 5 button array id=14 [slave keyboard (3)]
↳ Intel HID events id=15 [slave keyboard (3)]
↳ AT Translated Set 2 keyboard id=16 [slave keyboard (3)]
↳ MSI WMI hotkeys id=18 [slave keyboard (3)]
xinput --list-props "PNP0C50:00 06CB:CDAA Touchpad"
Device 'PNP0C50:00 06CB:CDAA Touchpad':
Device Enabled (187): 1
Coordinate Transformation Matrix (189): 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
libinput Tapping Enabled (338): 1
libinput Tapping Enabled Default (339): 0
libinput Tapping Drag Enabled (340): 1
libinput Tapping Drag Enabled Default (341): 1
libinput Tapping Drag Lock Enabled (342): 0
libinput Tapping Drag Lock Enabled Default (343): 0
libinput Tapping Button Mapping Enabled (344): 1, 0
libinput Tapping Button Mapping Default (345): 1, 0
libinput Natural Scrolling Enabled (322): 0
libinput Natural Scrolling Enabled Default (323): 0
libinput Disable While Typing Enabled (346): 1
libinput Disable While Typing Enabled Default (347): 1
libinput Scroll Methods Available (324): 1, 1, 0
libinput Scroll Method Enabled (325): 1, 0, 0
libinput Scroll Method Enabled Default (326): 1, 0, 0
libinput Click Methods Available (348): 1, 1
libinput Click Method Enabled (349): 1, 0
libinput Click Method Enabled Default (350): 1, 0
libinput Middle Emulation Enabled (351): 0
libinput Middle Emulation Enabled Default (352): 0
libinput Accel Speed (329): 0.382353
libinput Accel Speed Default (330): 0.000000
libinput Left Handed Enabled (334): 0
libinput Left Handed Enabled Default (335): 0
libinput Send Events Modes Available (307): 1, 1
libinput Send Events Mode Enabled (308): 0, 0
libinput Send Events Mode Enabled Default (309): 0, 0
Device Node (310): "/dev/input/event10"
Device Product ID (311): 1739, 52650
libinput Drag Lock Buttons (336): <no items>
libinput Horizontal Scroll Enabled (337): 1
答案1
我最终将触摸板驱动程序从 libinput 换成了 synaptics。Synaptics 具有 libinput 所缺乏的许多功能,其中之一就是禁用触摸板的某个部分。微调“键入时禁用触摸板”的时间间隔也是 Synaptics 的一项有用功能。
#disabling right part of touchpad
#install synaptics drivers
sudo apt install xserver-xorg-input-synaptics
reboot
xinput list-props "PNP0C50:00 06CB:CDAA Touchpad"
xinput list-props "PNP0C50:00 06CB:CDAA Touchpad"|grep Edges
#check the right edge dimension for the touchpad
synclient -l | grep RightEdge
#change the right edge boundary (and add this to startup programs)
synclient AreaRightEdge=900
#adjust cursor speed (and add this to startup programs)
xinput --set-prop "PNP0C50:00 06CB:CDAA Touchpad" "Device Accel Constant Deceleration" 1.05
#disable touchpad while typing (disable touchpad for 1 second after each keypress - add this to startup programs)
syndaemon -i 1 -t -K -R -d