如果笔记本没有自带的禁用触摸板快捷键,在Ubuntu中可以通过命令来禁用/开启触摸板
以戴尔XPS 13为例,其他笔记本电脑亦可参考使用此法。
1、查看输入设备
user_name@dell:~$ xinput list ⎡ Virtual core pointer id=2 [master pointer (3)] ⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)] ⎜ ↳ Logitech USB Receiver id=11 [slave pointer (2)] ⎜ ↳ DLL075B:01 06CB:76AF Touchpad id=13 [slave pointer (2)] ⎜ ↳ SynPS/2 Synaptics TouchPad id=19 [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)] ↳ Power Button id=8 [slave keyboard (3)] ↳ Sleep Button id=9 [slave keyboard (3)] ↳ Integrated_Webcam_HD: Integrate id=12 [slave keyboard (3)] ↳ Intel Virtual Button driver id=14 [slave keyboard (3)] ↳ Intel HID events id=15 [slave keyboard (3)] ↳ Intel HID 5 button array id=16 [slave keyboard (3)] ↳ Dell WMI hotkeys id=17 [slave keyboard (3)] ↳ AT Translated Set 2 keyboard id=18 [slave keyboard (3)] ↳ Logitech USB Receiver
xinput set-prop 'SynPS/2 Synaptics TouchPad' 'Device Enabled' 0 xinput set-prop 'DLL075B:01 06CB:76AF Touchpad' 'Device Enabled' 0
3、将开启和关闭触摸板的命令通过alias制作一个简单的命令,之后可以通过短命令来快捷切换,将如下内容写入~/.bashrc文件
# start and stop TouchPad alias tpoff="xinput set-prop 'SynPS/2 Synaptics TouchPad' 'Device Enabled' 0;xinput set-prop 'DLL075B:01 06CB:76AF Touchpad' 'Device Enabled' 0" alias tpon="xinput set-prop 'SynPS/2 Synaptics TouchPad' 'Device Enabled' 0;xinput set-prop 'DLL075B:01 06CB:76AF Touchpad' 'Device Enabled' 1"
4、试一试
user_name@dell:~$ source ~/.bashrc user_name@dell:~$ tpoff user_name@dell:~$ tpon原文链接:https://www.f2er.com/ubuntu/350937.html