Ubuntu 中自动禁用笔记本触摸板
Ubuntu 中自动禁用笔记本触摸板
1 背景
在笔记本电脑中使用外接鼠标时,时不时会由于误触触摸板,造成误输入。本文记录在 Ubuntu 20.04 系统中,如何使用 dconf-editor 来设置外接鼠标时自动禁用触摸板。
1.1 系统
- Thinkpad T14 AMD 版
- Ubuntu 20.04
- 鼠标:罗技 M720
2 方法
之前,在使用 Ubuntu 18.04 的时候,曾使用开源的 touchpad-indicator 来实现外接鼠标时自动禁用触摸板。不知道为什么,touchpad-indicator 在我的 Ubuntu 18.04 中不能开机自动启动。想到这个碴,今天准备给 Ubuntu 20.04 设置自动禁用触摸板功能时,试着上网搜搜有没有其它方案。于是乎,发现了这个英文帖子:
https://jonathanbossenger.com/disable-the-touch-pad-on-an-ubuntu-laptop-when-an-external-mouse-is-connected/
参照该帖子,在 Ubuntu 20.04 中,实现了外接鼠标时,自动禁用触摸板。下面把主要步骤用中文进行复述。
- 安装 dconf-editor :
sudo apt install dconf-editor
- 在终端中,运行 dconf-editor。 注意,dconf-editor 不只是可以用来设置自动禁用触摸板,还可以用来设置别的,使用的时候要小心!误设置可能会使系统崩溃。
- 启动 dconf-editor 后,在下面的设置页:
/org/gnome/desktop/peripherals/touchpad/send-events
找到 Custom value 设置项,把该项由 enabled 改为 disabled-on-external-mouse.
关掉 dconf-editor, 重启系统.
我用的是罗技的无线鼠标,目前测试成功。
浙公网安备 33010602011771号