BK863

Friday, September 01, 2006

Gentoo下的罗技MX518

1. Xorg 下按键消息查看
emerge xev

2. 启用evdev设备作为Mouse的驱动
emerge xf86-input-evdev

3. 添加udev寻找罗技鼠标的匹配规则




文件: /etc/udev/rules.d/010_local.rules


ACTION=="add", KERNEL=="event*", SYSFS{../name}=="Logitech USB-PS/2 Optical Mouse", NAME="input/event9"



NAME的event9可以任意指定,但与在下面的设置要相匹配

4. 修改xorg.conf, 启用罗技鼠标




文件: /etc/X11/xorg.conf


Section "ServerLayout"
... 其他无关
InputDevice "Mouse1" "CorePointer"
InputDevice "MX518" "AlwaysCore"
... 其他无关
EndSection

Section "InputDevice"
Identifier "MX518"
Driver "evdev"
Option "Device" "/dev/input/event9"
EndSection



至此,已经可以识别按钮1,2,3; 4,5(滚轮); 8,9,10(两个边按钮,一个窗口切换按钮)

5. 添加按键动作映射
emerge xvkbd
emerge xbindkeys





文件: ~/.xbindkeysrc


"/usr/bin/xvkbd -xsendevent -text "\[Alt_L]\[Left]""
m:0x0 + b:9
"/usr/bin/xvkbd -xsendevent -text "\[Alt_L]\[Right]""
m:0x0 + b:8


0 Comments:

Post a Comment

<< Home