答案1
无耻地被盗这里,因此制作了 CW(归功于吴鹏询问 Ubuntu);
运行xinput --list
以列出连接的设备:
% xinput list
⎡ Virtual core pointer id=2 [master pointer (3)]
⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)]
⎜ ↳ ETPS/2 Elantech 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)]
↳ USB2.0 HD UVC WebCam id=10 [slave keyboard (3)]
↳ Asus WMI hotkeys id=11 [slave keyboard (3)]
↳ AT Translated Set 2 keyboard id=12 [slave keyboard (3)]
找到你的鼠标(在我的例子中,我有一个触摸板,ETPS/2 Elantech Touchpad)并记下它的 ID(在我的例子中,它是 13);然后运行
xinput set-prop 13 "Device Enabled" 0
禁用它并
xinput set-prop 13 "Device Enabled" 1
再次重新启用它。