在 Ubuntu 13.04 机器上,我有以下输入设备:
$ xinput list
⎡ Virtual core pointer id=2 [master pointer (3)]
⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)]
⎜ ↳ Logitech USB LaserStream(TM) Mouse id=9 [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)]
↳ CHICONY HP Basic USB Keyboard id=8 [slave keyboard (3)]
↳ HP WMI hotkeys id=10 [slave keyboard (3)]
鼠标的默认配置是:
$ xinput list-props 9
Device 'Logitech USB LaserStream(TM) Mouse':
Device Enabled (143): 1
Coordinate Transformation Matrix (145): 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
Device Accel Profile (273): 0
Device Accel Constant Deceleration (274): 1.000000
Device Accel Adaptive Deceleration (275): 1.000000
Device Accel Velocity Scaling (276): 10.000000
Device Product ID (262): 1133, 49272
Device Node (263): "/dev/input/event3"
Evdev Axis Inversion (277): 0, 0
Evdev Axes Swap (279): 0
Axis Labels (280): "Rel X" (153), "Rel Y" (154), "Rel Horiz Wheel" (271), "Rel Vert Wheel" (272)
Button Labels (281): "Button Left" (146), "Button Middle" (147), "Button Right" (148), "Button Wheel Up" (149), "Button Wheel Down" (150), "Button Horiz Wheel Left" (151), "Button Horiz Wheel Right" (152), "Button Side" (266), "Button Extra" (267), "Button Forward" (268), "Button Back" (269), "Button Task" (270), "Button Unknown" (265), "Button Unknown" (265), "Button Unknown" (265), "Button Unknown" (265)
Evdev Middle Button Emulation (282): 0
Evdev Middle Button Timeout (283): 50
Evdev Third Button Emulation (284): 0
Evdev Third Button Emulation Timeout (285): 1000
Evdev Third Button Emulation Button (286): 3
Evdev Third Button Emulation Threshold (287): 20
Evdev Wheel Emulation (288): 0
Evdev Wheel Emulation Axes (289): 0, 0, 4, 5
Evdev Wheel Emulation Inertia (290): 10
Evdev Wheel Emulation Timeout (291): 200
Evdev Wheel Emulation Button (292): 4
Evdev Drag Lock Buttons (293): 0
我可以用来xinput set-prop 9 <num> <values>
设置一些属性,例如Evdev Axis Swap
属性。在这种情况下,更改会立即应用。
但是,如果我输入以下命令,xinput 输出中的值会发生变化,但鼠标的滚动行为保持不变:
xinput set-prop 9 289 0 0 5 4
其他Wheel Emulation
属性也不起作用。我做错了什么?
答案1
我相信它更像是(在我的系统上设置鼠标速度是 prop 11)
xinput set-prop 11 'Device Accel Constant Deceleration' 1
...就你的情况而言
xinput set-prop 9 'Evdev Wheel Emulation Axes' 0, 0, 5, 4
我不是专家,您可以随时使用 Xchat 进入 #Ubuntu IRC 频道寻求帮助。只需进入并清楚地陈述您的问题,不要问您是否可以询问,只需陈述您的问题并保持耐心。