如何在17.04中禁用鼠标加速
我不想在某个鼠标上加速鼠标,但一般都启用它。 为此,我之前使用了一个简单的单行程序,当我升级到17.04时,它已停止工作。
旧的oneliner:
xinput --set-prop 'USB OPTICAL MOUSE' 'Device Accel Profile' -1
这可以通过查看xinpuit --list-props 'USB OPTICAL MOUSE'
现在列出的内容来解释:
Device 'USB OPTICAL MOUSE': Device Enabled (140): 1 Coordinate Transformation Matrix (142): 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000 libinput Accel Speed (278): 0.000000 libinput Accel Speed Default (279): 0.000000 libinput Accel Profiles Available (280): 1, 1 libinput Accel Profile Enabled (281): 1, 0 libinput Accel Profile Enabled Default (282): 1, 0 (etc.)
并且xinput --set-prop 'USB OPTICAL MOUSE' 281 -1, 0
不能解决问题,所以我很无能为力,不知道正确的命令是什么。
显然,底层代码中的一些更改使得必须更改以前的命令: xinput --set-prop 'USB OPTICAL MOUSE' 'libinput Accel Profile Enabled' 0, 1
简短介绍@ db429对其他鼠标的回答。
编辑不要依赖ID。 它们在每次重启时都会更改(包括libinput的ID)。
(在这种情况下,G9显示两次;比较xinput list-props 9
和xinput list-props 10
显示id=9
是正确的。)
首先,使用xinput list
获取设备ID。
~> xinput list ⎡ Virtual core pointer id=2 [master pointer (3)] ⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)] ⎜ ↳ Logitech G9 Laser Mouse id=9 [slave pointer (2)] ⎜ ↳ Logitech G9 Laser Mouse id=10 [slave pointer (2)] ⎜ ↳ SynPS/2 Synaptics TouchPad id=13 [slave pointer (2)] ⎜ ↳ TPPS/2 IBM TrackPoint id=14 [slave pointer (2)]
可以使用ID或设备名称。 在我的情况下,我必须使用ID,因为名称存在两次。 ID 9
具有以下属性:
~> xinput list-props 9 Device 'Logitech G9 Laser Mouse': Device Enabled (140): 1 Coordinate Transformation Matrix (142): 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000 libinput Accel Speed (277): 0.000000 libinput Accel Speed Default (278): 0.000000 libinput Accel Profiles Available (279): 1, 1 libinput Accel Profile Enabled (280): 0, 1 (etc.)
要更改加速度配置文件,ID 280
也可以使用:
xinput set-prop 9 280 0, 1