xinput --list
顯示結果如下,可以看到目前所有的輸入裝置
⎡ Virtual core pointer id=2 [master pointer (3)]
⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)]
⎜ ↳ Logitech USB Receiver 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)]
↳ Power Button id=7 [slave keyboard (3)]
↳ Heng Yu Technology K108D id=8 [slave keyboard (3)]
↳ Heng Yu Technology K108D id=9 [slave keyboard (3)]
↳ USB2.0 Camera id=10 [slave keyboard (3)]
↳ Logitech USB Receiver id=11 [slave keyboard (3)]
xinput --list-props "Logitech USB Receiver"
我這邊因為是使用無線鍵鼠組,一個無線接收器可以收滑鼠跟鍵盤的訊號所以鍵盤、滑鼠都名稱相同,會使程式無法辨認,可改用 id 設定,我的滑鼠 id 為 12,指令如下
xinput --list-props 12
這時候會看到一大串滑鼠的屬性
Device 'Logitech USB Receiver':
Device Enabled (145): 1
Coordinate Transformation Matrix (147): 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
Device Accel Profile (275): 0
Device Accel Constant Deceleration (276): 0.550000
Device Accel Adaptive Deceleration (277): 1.000000
Device Accel Velocity Scaling (278): 10.000000
Device Product ID (262): 1133, 50478
Device Node (263): "/dev/input/event6"
Evdev Axis Inversion (279): 0, 0
Evdev Axes Swap (281): 0
Axis Labels (282): "Rel X" (155), "Rel Y" (156), "Rel Horiz Wheel" (272), "Rel Dial" (273), "Rel Vert Wheel" (274)
Button Labels (283): "Button Left" (148), "Button Middle" (149), "Button Right" (150), "Button Wheel Up" (151), "Button Wheel Down" (152), "Button Horiz Wheel Left" (153), "Button Horiz Wheel Right" (154), "Button Side" (267), "Button Extra" (268), "Button Forward" (269), "Button Back" (270), "Button Task" (271), "Button Unknown" (265), "Button Unknown" (265), "Button Unknown" (265), "Button Unknown" (265), "Button Unknown" (265), "Button Unknown" (265), "Button Unknown" (265), "Button Unknown" (265), "Button Unknown" (265), "Button Unknown" (265), "Button Unknown" (265), "Button Unknown" (265)
Evdev Middle Button Emulation (284): 0
Evdev Middle Button Timeout (285): 50
Evdev Third Button Emulation (286): 0
Evdev Third Button Emulation Timeout (287): 1000
Evdev Third Button Emulation Button (288): 3
Evdev Third Button Emulation Threshold (289): 20
Evdev Wheel Emulation (290): 0
Evdev Wheel Emulation Axes (291): 0, 0, 4, 5
Evdev Wheel Emulation Inertia (292): 10
Evdev Wheel Emulation Timeout (293): 200
Evdev Wheel Emulation Button (294): 4
Evdev Drag Lock Buttons (295): 0
影響滑鼠靈敏度的屬性是 Device Accel Constant Deceleration,有點算是移動阻力的意思,數值愈大移動愈慢反之移動愈快。而設定屬性的方法如下,這裡我把它設定為 0.55
xinput --set-prop 12 "Device Accel Constant Deceleration" 0.55
或者也可以用屬性的編號
xinput --set-prop 12 276 0.55
修改完後再次輸入查看滑鼠屬性的指令就會發現 Device Accel Constant Deceleration 變成 0.55 了。
Reference
How can I set mouse sensitivity, not just mouse acceleration?
How to change mouse speed/sensitivity?
原來是這樣設定~~thx
回覆刪除