set up middle button of the mouse which doesn't work:
[terrence@igloo terrence]$ man gpm
...
-R name
Causes `gpm' to act as a repeater: any mouse data
received while in graphic mode will be produced on
the fifo `/dev/gpmdata' in protocol name. In prin
ciple, you can use the same names as for the `-t'
option, although repeating into some protocols may
not be implemented for a while. In addition, you
can specify `raw' as the name, to repeat the mouse
data byte by byte, without any protocol transla
tion. If name is omitted, it defaults to `msc'.
Using gpm in repeater mode, you can configure the X
server to use its fifo as a mouse device. This
option is useful for bus-mouse owners to override
the single-open limitation. It is also an easy way
to manage those stupid dual-mode mice which force
you to keep the middle button down while changing
video mode. The option is forced on by the `-M'
option.
...
[root@esker /root]# cat /etc/rc.d/init.d/gpm
...
if [ "$MOUSETYPE" = "Microsoft" ]; then
MOUSETYPE=ms
fi
if [ -n "$MOUSETYPE" ]; then
daemon gpm -R -t $MOUSETYPE
else
daemon gpm
fi
...
[root@esker /root]# ls -al /dev/gpm*
srwx------ 1 root root 0 Mar 16 10:41 /dev/gpmctl
prw-r--r-- 1 root root 0 Mar 16 10:56 /dev/gpmdata
[root@esker /root]# cat /etc/X11/XF86Config
...
# **********************************************************************
# Pointer section
# **********************************************************************
Section "Pointer"
Protocol "MouseSystems"
Device "/dev/gpmdata"
# When using XQUEUE, comment out the above two lines, and uncomment
# the following line.
# Protocol "Xqueue"
# Baudrate and SampleRate are only for some Logitech mice
# BaudRate 9600
# SampleRate 150
# Emulate3Buttons is an option for 2-button Microsoft mice
# Emulate3Timeout is the timeout in milliseconds (default is 50ms)
# Emulate3Buttons
# Emulate3Timeout 50
# ChordMiddle is an option for some 3-button Logitech mice
# ChordMiddle
EndSection
...
Tips: -R doesn't support Microsoft protocal correctly. So gpm should
be run without "-t" option. Protocol is still "MouseSystems" in
XF86Config.
Enjoy middle button of the mouse!!!
|