Getting additional mouse buttons to be useful in linux

Posted by Chris Tue, 29 Jan 2008 16:20:00 GMT

Quick follow up to the previous post. I have a Microsoft Laser Mouse 6000, which happens to have two side buttons, which in Windows correspond to the Back and Forward actions in things like web browsers and Explorer. In linux, these buttons don’t do anything by default, but I finally got them working.

All I had to do was install xbindkeys, which for OpenSuSE 10.3 can be found via the OpenSuSE Build Service. After that is installed, you create the file $HOME/.xbindkeysrc and put something like the following into it:

    "xvkbd  -text "\[Alt]\[Left]""
          m:0x0 + b:8
    "xvkbd  -text "\[Alt]\[Right]""
          m:0x0 + b:9

The b:8 and b:9 parts are the mouse buttons you want to listen for, which can be found by using xev.

After that file is set up, you just need to make sure that xbindkeys is started when you start X, which can be done in a script in $HOME/.kde/Autostart, maybe just added to the script I mentioned in the previous post about how to get multimedia keys working in linux. For the time being, you can just run xbindkeys from a commandline in your current session.

Once all this is done, xbindkeys will listen for the mouse buttons you set up and send the specified keyboard commands, in this case Alt+Left and Alt+Right, which should get you Back and Forward actions in your browsers.

Comments

Leave a comment

Comments