How do I configure a gaming mouse in Ubuntu?

I bought a Elecom Huge trackball and I’m trying to configure the extra buttons to work with Rimworld on Steam. Steam only has remedial mouse support AFAIK and Ubuntu does not seem to have a gaming mouse app.
I want to bind certain tasks like building walls and doors to different mouse keys.

Asked By: Jason


To rebind additional mouse keys on Linux in case there is no manufacturer-delivered Linux driver, you have a number of options:

  • piper emulates gaming mouse configuration tools for a number of common gaming mice. Yours being fairly obscure though it probably won’t work.

  • Alternative, there are tools to rebind mouse keys on X11 level such as:

To identify the number each mouse button has in X, use something like

xev | grep -A 2 Button

and click in the window that appears to show all Button events with their associated button number.

Note that in case your mouse already has some keybindings hard-coded in its firmware (e.g. from a prior Windows configuration), X may detect these as keypresses and not mouse buttons, so rebinding them may not work as intended. To check if that’s the case, use simply xev to see if the button presses register as KeyPress events.

For completeness, there are also tools to remap game controllers and joysticks, e.g. qjoypad (also X11 only).

Answered By: Sebastian
Categories: Answers Tags: , , , ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.