個人偏好羅技的有線滑鼠,滾輪鍵有四向的功能,但從windows轉檯到ubuntu時遇到了一些麻煩,就是滑鼠的左移、右移失效了,現在利用下面方法設定回來。
1.打開終端機輸入,查詢滑鼠id
~$ xinput list
⎡ Virtual core pointer id=2 [master pointer (3)]
⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)]
⎜ ↳ Logitech USB Laser Mouse id=9 [slave pointer (2)]
⎜ ↳ Logitech K360 id=11 [slave pointer (2)]
⎜ ↳ Logitech K360 id=10 [slave pointer (2)]
⎜ ↳ Logitech M325 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)]
↳ Power Button id=8 [slave keyboard (3)]
終於找到了,我的滑鼠id = 9
2.查詢滑鼠的屬性
~$xinput list-props 9
Device 'Logitech USB Laser Mouse':
Device Enabled (139): 1
Coordinate Transformation Matrix (141): 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
Device Accel Profile (270): 0
Device Accel Constant Deceleration (271): 1.000000
Device Accel Adaptive Deceleration (272): 1.000000
Device Accel Velocity Scaling (273): 10.000000
Device Product ID (259): 1133, 49250
Device Node (260): "/dev/input/event3"
Evdev Axis Inversion (274): 0, 0
Evdev Axes Swap (276): 0
Axis Labels (277): "Rel X" (149), "Rel Y" (150), "Rel Horiz Wheel" (268), "Rel Vert Wheel" (269)
Button Labels (278): "Button Left" (142), "Button Middle" (143), "Button Right" (144), "Button Wheel Up" (145), "Button Wheel Down" (146), "Button Horiz Wheel Left" (147), "Button Horiz Wheel Right" (148), "Button Side" (263), "Button Extra" (264), "Button Forward" (265), "Button Back" (266), "Button Task" (267), "Button Unknown" (262), "Button Unknown" (262), "Button Unknown" (262), "Button Unknown" (262)
Evdev Scrolling Distance (279): 1, 1, 1
Evdev Middle Button Emulation (280): 0
Evdev Middle Button Timeout (281): 50
Evdev Middle Button Button (282): 2
Evdev Third Button Emulation (283): 0
Evdev Third Button Emulation Timeout (284): 1000
Evdev Third Button Emulation Button (285): 3
Evdev Third Button Emulation Threshold (286): 20
Evdev Wheel Emulation (287): 0
Evdev Wheel Emulation Axes (288): 0, 0, 4, 5
Evdev Wheel Emulation Inertia (289): 10
Evdev Wheel Emulation Timeout (290): 200
Evdev Wheel Emulation Button (291): 4
Evdev Drag Lock Buttons (292): 0
3.羅技滑鼠數字對映的功能,請參閱
1.打開終端機輸入,查詢滑鼠id
~$ xinput list
⎡ Virtual core pointer id=2 [master pointer (3)]
⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)]
⎜ ↳ Logitech USB Laser Mouse id=9 [slave pointer (2)]
⎜ ↳ Logitech K360 id=11 [slave pointer (2)]
⎜ ↳ Logitech K360 id=10 [slave pointer (2)]
⎜ ↳ Logitech M325 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)]
↳ Power Button id=8 [slave keyboard (3)]
~$xinput list-props 9
Device 'Logitech USB Laser Mouse':
Device Enabled (139): 1
Coordinate Transformation Matrix (141): 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
Device Accel Profile (270): 0
Device Accel Constant Deceleration (271): 1.000000
Device Accel Adaptive Deceleration (272): 1.000000
Device Accel Velocity Scaling (273): 10.000000
Device Product ID (259): 1133, 49250
Device Node (260): "/dev/input/event3"
Evdev Axis Inversion (274): 0, 0
Evdev Axes Swap (276): 0
Axis Labels (277): "Rel X" (149), "Rel Y" (150), "Rel Horiz Wheel" (268), "Rel Vert Wheel" (269)
Button Labels (278): "Button Left" (142), "Button Middle" (143), "Button Right" (144), "Button Wheel Up" (145), "Button Wheel Down" (146), "Button Horiz Wheel Left" (147), "Button Horiz Wheel Right" (148), "Button Side" (263), "Button Extra" (264), "Button Forward" (265), "Button Back" (266), "Button Task" (267), "Button Unknown" (262), "Button Unknown" (262), "Button Unknown" (262), "Button Unknown" (262)
Evdev Scrolling Distance (279): 1, 1, 1
Evdev Middle Button Emulation (280): 0
Evdev Middle Button Timeout (281): 50
Evdev Middle Button Button (282): 2
Evdev Third Button Emulation (283): 0
Evdev Third Button Emulation Timeout (284): 1000
Evdev Third Button Emulation Button (285): 3
Evdev Third Button Emulation Threshold (286): 20
Evdev Wheel Emulation (287): 0
Evdev Wheel Emulation Axes (288): 0, 0, 4, 5
Evdev Wheel Emulation Inertia (289): 10
Evdev Wheel Emulation Timeout (290): 200
Evdev Wheel Emulation Button (291): 4
Evdev Drag Lock Buttons (292): 0
ID | Hardware Action | Result |
---|---|---|
1 | Large button left | normal click |
2 | Both large buttons | middle-click † |
3 | Large button right | right-click |
4 | Roll ball down | move cursor down |
5 | Roll ball up | move cursor up |
6 | Roll ball left | move cursor left |
7 | Roll ball right | move cursor right |
8 | Small button left | browser back |
9 | Small button right | browser forward |
為了達成四向功能,必需將功能6、7換成8、9
4.得到預設的按鍵地圖
~$ xinput get-button-map 9
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
5.修改它
~$ xinput set-button-map 9
1 2 3 4 5 8 9 6 7 10 11 12 13 14 15 16
留言
張貼留言