使用 XFree 4.x,任务变得更加简单。首先,主鼠标通常已经存在于配置文件中
Section "InputDevice"
Identifier "Mouse0"
Driver "mouse"
Option "Device" "/dev/mouse"
Option "Protocol" "PS/2"
Option "Emulate3Buttons" "off"
Option "ZAxisMapping" "4 5"
EndSection |
要添加另一个鼠标,只需复制以上部分并进行修改,使其读取
Section "InputDevice"
Identifier "Mouse1"
Driver "mouse"
Option "Device" "/dev/input/mice"
Option "Protocol" "IMPS/2"
Option "Emulate3Buttons" "off"
Option "ZAxisMapping" "4 5"
EndSection |
这样,您可以根据需要定义任意数量的附加指针,这同样适用于操纵杆和平板电脑。
为了使两个鼠标协同工作,还需要对XF86Config文件进行另一项更改。有一个名为 *ServerLayout* 的部分,其中指定了所有组件。以下是在添加第二个鼠标*之前*的样子
Section "ServerLayout"
Identifier "XFree86 Configured"
Screen 0 "Screen0" 0 0
InputDevice "Mouse0" "CorePointer"
InputDevice "Keyboard0" "CoreKeyboard"
EndSection |
这是添加第二个鼠标*之后*的样子
Section "ServerLayout"
Identifier "XFree86 Configured"
Screen 0 "Screen0" 0 0
InputDevice "Mouse0" "CorePointer"
InputDevice "Mouse1" "AlwaysCore"
InputDevice "Keyboard0" "CoreKeyboard"
EndSection |