2009年1月28日星期三

Ubuntu 8.10里指点杆中键模拟鼠标滚轮的配置方法

Ubuntu 8.10里指点杆中键模拟鼠标滚轮的配置方法
方法一:
创建文件:/etc/hal/fdi/policy/mouse-wheel.fdi


true
2
4 5
true


xorg.conf不用修改。

方法二:
先查看/var/log/Xorg.0.log,找到以下内容:

(**) TPPS/2 IBM TrackPoint: always reports core events
(**) TPPS/2 IBM TrackPoint: Device: "/dev/input/event8"
(II) TPPS/2 IBM TrackPoint: Found x and y relative axes
(II) TPPS/2 IBM TrackPoint: Found 3 mouse buttons
(II) TPPS/2 IBM TrackPoint: Configuring as mouse
(II) XINPUT: Adding extended input device "TPPS/2 IBM TrackPoint" (type: MOUSE)
(**) TPPS/2 IBM TrackPoint: YAxisMapping: buttons 4 and 5
(**) TPPS/2 IBM TrackPoint: EmulateWheelButton: 4, EmulateWheelInertia: 10, EmulateWheelTimeout: 200

可见设备已经识别,设备名称是/dev/input/event8,只是模拟鼠标滚轮的默认是第4键。所以修改/etc/X11/xorg.conf如下:

Section "InputDevice"
Identifier "Configured Mouse"
Driver "evdev"
Option "CorePointer"
Option "Device" "/dev/input/event8"
Option "Emulate3Buttons" "true"
Option "EmulateWheel" "true"
Option "EmulateWheelButton" "2"
Option "ZAxisMapping" "4 5"
EndSection

Section "ServerLayout"
Identifier "Default Layout"
Screen "Default Screen"
Inputdevice "Configured Mouse"
EndSection

和以前的方法不同一个是Device,mice不行了;另一个是Driver,现在是evdev。

没有评论: