squ*_*org 61
关闭触摸板:
synclient TouchpadOff=1
Run Code Online (Sandbox Code Playgroud)
要重新打开它:
synclient TouchpadOff=0
Run Code Online (Sandbox Code Playgroud)
小智 26
至少有两种方法(我知道)您可以尝试。
如果您的笔记本电脑配备了 Synaptics(或 ALPS)触摸板,您确实可以使用synclient
Shutupsquare 已经提到的方法。我正在运行 Ubuntu 14.04,并且在我的机器上默认安装了它。
测试synclient是否安装:(synclient -V
应该报版本号)
打开触摸板: synclient TouchpadOff=0
关闭触摸板: synclient TouchpadOff=1
我自己没有测试过这个,但如果你的目标是当你的手臂放在触摸板上时不移动鼠标,这可能会有所帮助。
打开手掌检测: synclient PalmDetect=1
关闭手掌检测: synclient PalmDetect=0
通常,您可以通过 配置 Synaptics 触摸板的任何属性synclient property=value
。如果该属性是显示的可用属性之一synclient -l
ubuntu - 社区帮助维基 - SynapticsTouchpad
archlinux - wiki - 触摸板 Synaptics
问 ubuntu - 如何使我的 synclient 设置保持不变?- Ubuntu
如果您不想或不能使用 synclient,您也可以使用xinput
. 过程有些相似。
列出所有 xinput 设备: xinput
部分输出可能如下所示:
? Virtual core pointer id=2 [master pointer (3)]
? ? Virtual core XTEST pointer id=4 [slave pointer (2)]
? ? Logitech USB-PS/2 Optical Mouse id=13 [slave pointer (2)]
? ? ETPS/2 Elantech Touchpad id=17 [slave pointer (2)]
Run Code Online (Sandbox Code Playgroud)
在这种特殊情况下,我的触摸板的 id=17,其全名是“ETPS/2 Elantech Touchpad”。
设置属性的命令是xinput set-prop
。启用或禁用触摸板的属性是Device Enabled
,因此要启用或禁用它,请键入:
打开触摸板:(您的设备 ID 在xinput set-prop <id> "Device Enabled" 1
哪里<id>
,在我的情况下为 17)
关闭触摸板: xinput set-prop <id> "Device Enabled" 0
打开手掌检测: xinput set-prop <id> "Palm Detection" 1
关闭手掌检测: xinput set-prop <id> "Palm Detection" 0
要查询可用属性:xinput list-props <id>
OR xinput list-props <full-name>
,这应该与synclient -l
.
通过任一工具设置属性时,xinput
或未synclient
将属性设置为其他工具。它们也没有设置在 unity-control-center 中。
synclient
并xinput
不会工作,如果你使用的是GNOME(或统一,肉桂)环境,因为它将覆盖的设置,所以如果你想synclient
或xinput
接管这些设置,您应该禁用第一:
安装dconf-editor
如果没有安装:
apt-get install dconf-editor
Run Code Online (Sandbox Code Playgroud)跑 dconf-editor
dconf-editor
Run Code Online (Sandbox Code Playgroud)打开目录/org/gnome/settings-daemon/plugins/mouse/
或/org/cinnamon/settings-daemon/plugins/mouse/
,然后取消单击 的复选框active
。
logout
或者 reboot
这应该使synclient
或xinput
工作。