Tips Linux Explorers   All Things Linux Forum   Great Linux Links   LinuxClues.com   Hometown    



EXTRA MOUSE BUTTONS


A lot of you people have a mouse with all those fancy extra buttons: three, four or even seven buttons are common place these days. Makes me wonder where we will end up . . maybe some day the keyboard will be integrated in your mouse  !
Anyway, let´s get those buttons work for us:

First you need to set up your mouse in XFree86 (When using Xorg the file is /etc/X11/xorg.conf )

CODE
$ cat /etc/X11/XF86Config-4

( to check if the file is in the right place, if so: )

CODE
$ su
< password >
# vi /etc/X11/XF86Config-4

(open the file in vi )
"i" ( put vi in insert mode )
look for the ¨input device¨ mouse section and adapt it to look like: ( line 3, 5 and 6 !! )

QUOTE (Text @ Config File)
Identifier "Mouse1"
Driver "mouse"
Option "Protocol" "ExplorerPS/2"
Option "Device" "/dev/psaux"
Option "Buttons" "7"
Option "ZAxisMapping" "6 7"

Save and close vi :
Esc
ZZ


After that you need to give the command:

CODE
# xmodmap -e "pointer =1236745"  

Then make a script in .kde/Autostart :

CODE
$ vi /home/bruno/.kde/Autostart/mouse

(makes the file ¨mouse¨ )
"i" ( put vi in insert mode )

and put the following lines in there:

QUOTE (Text @ Script)
#!/bin/sh
xmodmap -e "pointer = 1 2 3 6 7 4 5"

Save and close vi
Esc
ZZ


Once your wheel works you can test to see the extra buttons with < xev > (place mouse in the square and click the buttons and see what happens).

Then you need to download the program ¨imwheel¨ (1.0.0pre1) you can find it Here and install it.
It is a .tar.gz file ( tarball ) see for instructions of the Tip "TAR unpacking Packages"

And make a file .imwheelrc in your /home directory:

CODE
$ vi /home/bruno/.imwheelrc

(creates the file )
"i" (puts vi in insert mode )

and add the lines:

QUOTE (Text @ Script)
".*"
None, Up, Alt_L|Left
None, Down, Alt_L|Right

Save and close vi
Esc
ZZ

And make a script to start the imwheel program:


CODE
$ vi /home/bruno/.kde/Autostart/imwheel

( makes the file in Autostart )
"i" ( puts vi in insert mode )

With the following lines:

QUOTE (Text @ Script)
#!/bin/sh
imwheel -k -b "67"


Save and close vi
Esc
ZZ

And that is all my friends, now you can simply restart KDE ( or give the command: imwheel -k -b "67" ) and have fun !


Bruno


PS: Thanks to Ryan for testing and providing the link !


NOTE: PCLos 9.2 seems to need special treatment, you can read about the solution Here



-- May 15 2003 ( Revised Apr 3 2006 ) --


Tips Linux Explorers   All Things Linux Forum   Great Linux Links   LinuxClues.com   Hometown