我刚刚在 HP 8460W 上安装了 18.04.2。通常在笔记本电脑上我喜欢:
- 连接 USB 鼠标时关闭触摸板
- 关闭键盘中间的小操纵杆(及其空格键附近的按钮)永远
在 Ubuntu 中我该如何做这两件事?如果有必要的话,我选择了默认的基于 Gnome 的桌面。
输出xinput
⎡ Virtual core pointer id=2 [master pointer (3)]
⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)]
⎜ ↳ PS/2 Generic Mouse id=11 [slave pointer (2)]
⎜ ↳ SynPS/2 Synaptics TouchPad id=12 [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)]
↳ Sleep Button id=8 [slave keyboard (3)]
↳ HP HD Webcam [Fixed]: HP HD Web id=9 [slave keyboard (3)]
↳ AT Translated Set 2 keyboard id=10 [slave keyboard (3)]
↳ HP WMI hotkeys id=13 [slave keyboard (3)]
输出xinput --list-props 11
Device 'PS/2 Generic Mouse':
Device Enabled (148): 1
Coordinate Transformation Matrix (150): 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
libinput Natural Scrolling Enabled (283): 0
libinput Natural Scrolling Enabled Default (284): 0
libinput Scroll Methods Available (285): 0, 0, 1
libinput Scroll Method Enabled (286): 0, 0, 1
libinput Scroll Method Enabled Default (287): 0, 0, 1
libinput Button Scrolling Button (288): 2
libinput Button Scrolling Button Default (289): 2
libinput Middle Emulation Enabled (290): 0
libinput Middle Emulation Enabled Default (291): 0
libinput Accel Speed (292): 0.000000
libinput Accel Speed Default (293): 0.000000
libinput Accel Profiles Available (294): 1, 1
libinput Accel Profile Enabled (295): 1, 0
libinput Accel Profile Enabled Default (296): 1, 0
libinput Left Handed Enabled (297): 0
libinput Left Handed Enabled Default (298): 0
libinput Send Events Modes Available (268): 1, 0
libinput Send Events Mode Enabled (269): 0, 0
libinput Send Events Mode Enabled Default (270): 0, 0
Device Node (271): "/dev/input/event5"
Device Product ID (272): 2, 1
libinput Drag Lock Buttons (299): <no items>
libinput Horizontal Scroll Enabled (300): 1
输出xinput --list-props 12
Device 'SynPS/2 Synaptics TouchPad':
Device Enabled (148): 1
Coordinate Transformation Matrix (150): 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
libinput Tapping Enabled (301): 1
libinput Tapping Enabled Default (302): 0
libinput Tapping Drag Enabled (303): 1
libinput Tapping Drag Enabled Default (304): 1
libinput Tapping Drag Lock Enabled (305): 0
libinput Tapping Drag Lock Enabled Default (306): 0
libinput Tapping Button Mapping Enabled (307): 1, 0
libinput Tapping Button Mapping Default (308): 1, 0
libinput Natural Scrolling Enabled (283): 1
libinput Natural Scrolling Enabled Default (284): 0
libinput Disable While Typing Enabled (309): 1
libinput Disable While Typing Enabled Default (310): 1
libinput Scroll Methods Available (285): 1, 1, 0
libinput Scroll Method Enabled (286): 1, 0, 0
libinput Scroll Method Enabled Default (287): 1, 0, 0
libinput Accel Speed (292): 0.000000
libinput Accel Speed Default (293): 0.000000
libinput Left Handed Enabled (297): 0
libinput Left Handed Enabled Default (298): 0
libinput Send Events Modes Available (268): 1, 1
libinput Send Events Mode Enabled (269): 0, 0
libinput Send Events Mode Enabled Default (270): 0, 0
Device Node (271): "/dev/input/event6"
Device Product ID (272): 2, 7
libinput Drag Lock Buttons (299): <no items>
libinput Horizontal Scroll Enabled (300): 1
输出xinput --list-props 13
Device 'HP WMI hotkeys':
Device Enabled (148): 1
Coordinate Transformation Matrix (150): 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
libinput Send Events Modes Available (268): 1, 0
libinput Send Events Mode Enabled (269): 0, 0
libinput Send Events Mode Enabled Default (270): 0, 0
Device Node (271): "/dev/input/event8"
Device Product ID (272): 0, 0
答案1
要在连接 USB 鼠标时关闭触摸板,请运行以下命令
gsettings set org.gnome.desktop.peripherals.touchpad send-events 'disabled-on-external-mouse'
要重置上述命令,请运行以下命令
gsettings reset org.gnome.desktop.peripherals.touchpad send-events
- 要关闭小操纵杆,您需要从输出中找出此操纵杆的 ID
xinput
,也许需要禁用有意义的 ID,然后查看哪一个是正确的 ID。
从您的xinput
输出来看,操纵杆的 ID 似乎是 11。
要禁用此操纵杆,请运行以下命令
xinput --disable 11
上述命令将禁用操纵杆,直到您注销或重新启动。
要永久禁用它,请xinput --disable 11
在启动应用程序首选项列表中添加命令。