I have a mouse with lots of buttons, but it's not a mainstream make like Logitech. For Windows, I have a driver that lets me assign actions like close-window (Ctrl+W) or next-tab (Ctrl+Tab), but I don't have a Linux driver. Since Linux is so flexible, I thought perhaps there is a general way to do this, regardless of brand?

Update 2: In System>Prefs>Mouse there's a lightbulb icon for testing double-click speed. Every working button can turn the bulb on&off, but the missing buttons can't. It would seem that Ubuntu isn't aware of these buttons and thus doesn't register their clicks. I guess I need to hunt for a driver, though a mainstream mouse is probably the easier way.

I tested my mouse with btnx but it didn't recognize all my buttons. Does this indicate a problem with my mouse (driver?) or with btnx (unlikely I guess)?
–
Torben Gundtofte-BruunJan 4 '11 at 20:57

Am guessing between. Maybe the mouse module is not detecting the mouse correctly so btnx does not either. Can you actually click all the buttons and see if a programa recognizes them, like the click test in the mouse settings.
–
Luis Alvarado♦Jan 4 '11 at 21:43

1

I'm selecting this as the correct answer because btnx allows me to instantly test each mouse button - this proved that Ubuntu simply isn't aware of the extra buttons. I need to get a linux-friendly mouse.
–
Torben Gundtofte-BruunFeb 9 '11 at 7:34

8

btnx can not be found - has the package changed name?
–
northbenSep 10 '13 at 21:31

2) So, basically, you only need to map those buttons with desired actions. How to know with button is pressed and the correspondent numeric code? Well, you can use the 'xev' program:

xev

This program is a key and mouse events sniffer. When it's running, you can see a window in which you can press mouse buttons and see if they are detected. For example, with the zoom button of the Performance MX you will see something like that:

that means that 13 is the code for that mouse button. You can try every mouse buttons on your hand ... for easy access, here is the map for Performance MX:

Back button: 8

Forward button: 9

Zoom button: 13

Show windows button: 10

the other buttons are well recognized and you don't need to map to actions.

3) Now, you need to install a little program to re-map mouse and keyboard inputs. The magician is 'xbindkeys' ... the easy installation is using:

sudo apt-get install xbindkeys

4) Once installed, you can do the magic. The idea is configure the mouse buttons to send key combinations to activate other desktop functionalities (as the matter of fact, xbindkeys can be used for execute any other program when you press a mouse button). In KDE you can do that with Ctrl+F10 keys combination. The point is create a xbindkeys' configuration file to do the job.

5) To create the configuration file, just run the following command:

xbindkeys --defaults > $HOME/.xbindkeysrc

6) And we need to edit the file to specify your button's mapping:

gedit $HOME/.xbindkeysrc

7) We need to add our button-to-key configurations. For example, I have the following:

Easystroke is a Mouse gesture-recognition application and mouse gesture manager for Ubuntu and Other Linux distribution. it allows user to control ubuntu application with hand drawn mouse gestures or Draw on the Screen. Easystroke work on Tablet PCs, it can be used equally well with a mouse, pen, or even your fingers if you have a touch-sensitive screen.

Install Easystroke in Ubuntu

sudo apt-get install easystroke

If you want installing easystroke via PPA, you can adding a PPA repository, type this command: