Ubuntu的桌面系统对于鼠标有一些设置选项,比如双击的速度、鼠标指针移动速度,但是效果不明显,有时候即使把移动速度调到最低还是很快。
你不能说Linux系统本身对鼠标的支持差,只不过很多参数属性并没有暴露出来给用户自定义,而默认的参数调教的也差强人意,但是我们可以通过一些命令去设置,毕竟Linux是个开源开放的系统。
⎡ Virtual core pointer id=2 [master pointer (3)] ⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)] ⎜ ↳ Razer Razer DeathAdder Essential id=10 [slave pointer (2)] ⎜ ↳ Razer Razer DeathAdder Essential Consumer Control 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)] ... ... ...当我们需要查看某个设备的属性的时候,可以使用xinput list-props id,后面的id就是设备的id,在我的电脑鼠标就是10,不同电脑的值不一样,甚至同一个电脑插在不同的USB口也不一样,这一点需要注意一下。
hj@jun:~$ xinput list-props 10 Device 'Razer Razer DeathAdder Essential': Device Enabled (168): 1 Coordinate Transformation Matrix (170): 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000 Device Accel Profile (293): 0 Device Accel Constant Deceleration (294): 1.000000 Device Accel Adaptive Deceleration (295): 1.000000 Device Accel Velocity Scaling (296): 1.000000 Device Product ID (286): 5426, 110 Device Node (287): "/dev/input/event4" Evdev Axis Inversion (297): 0, 0 Evdev Axes Swap (299): 0 ... ... ...这上面的参数比较多,具体参数有啥用我也不是太清楚,但是调节其中一项非常有用,那就是Device Accel Velocity Scaling,对于我来说,设置为1感觉效果非常好,这个不同的鼠标可能不一样,建议多尝试几次。如果效果不太明显的话可以试着调整一下Device Accel Constant Deceleration和Device Accel Adaptive Deceleration这个2个值
xinput --set-prop 10 "Device Accel Velocity Scaling" 1二.滚轮滚动太慢
".*" None, Up, Button4, 4 None, Down, Button5, 4 Control_L, Up, Control_L|Button4 Control_L, Down, Control_L|Button5 Shift_L, Up, Shift_L|Button4 Shift_L, Down, Shift_L|Button5最主要的就是前面2个行,后面几行可以不用管,其中“4”设置的就是滚动速度,大家可以根据自己的需要设置合适的值,保存之后可以通过killall imwheel && imwheel重新加载配置。