ubuntu 羅技滑鼠設定

個人偏好羅技的有線滑鼠,滾輪鍵有四向的功能,但從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.羅技滑鼠數字對映的功能,請參閱
ID    Hardware Action    Result                
1Large button leftnormal click
2Both large buttonsmiddle-click  †
3Large button rightright-click
4Roll ball downmove cursor down
5Roll ball upmove cursor up
6Roll ball leftmove cursor left
7Roll ball rightmove cursor right
8Small button leftbrowser back
9Small button rightbrowser 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 


留言