在 Ubuntu 16.04 中,我可以使用以下命令禁用键盘xinput
并仍然输入:
$ xinput disable 12
$ xinput list-props 12
Device 'Corsair Corsair K70 RGB Gaming Keyboard':
Device Enabled (133): 0
Coordinate Transformation Matrix (135): 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
Device Product ID (251): 6940, 6931
Device Node (252): "/dev/input/event3"
$ xinput enable 12
我尝试禁用所有其他键盘设备,包括一次性禁用所有设备。我尝试过,float
并reattach
按照另一个答案。
答案1
由于某种原因,也需要禁用键盘设备的指针部分:
$ xinput list
⎡ Virtual core pointer id=2 [master pointer (3)]
⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)]
⎜ ↳ Razer Razer DeathAdder Chroma id=9 [slave pointer (2)]
⎜ ↳ Razer Razer DeathAdder Chroma id=10 [slave pointer (2)]
⎜ ↳ Corsair Corsair K70 RGB Gaming Keyboard 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)]
↳ Power Button id=8 [slave keyboard (3)]
↳ Razer Razer DeathAdder Chroma id=11 [slave keyboard (3)]
↳ Microsoft® LifeCam Studio(TM) id=14 [slave keyboard (3)]
↳ Dell WMI hotkeys id=15 [slave keyboard (3)]
↳ Corsair Corsair K70 RGB Gaming Keyboard id=12 [slave keyboard (3)]
禁用 12 和 13 都是有效的。