Score:0

How do I configure a gaming mouse in Ubuntu?

in flag

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.

Score:1
in flag

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).

Jason avatar
in flag
Good answer so far. Piper soft failed. xbindkeys hard failed. xdotools is promising so far. I'm having trouble getting through the menu all the way to walls building. Ironically the UI is too mouse-driven to make easy keybinds.
Sebastian avatar
in flag
@Jason If `xbindkeys` crashes I would maybe investigate why that is. In general what you would want to do is bind your extra mouse buttons to some otherwise unused keys (e.g. u,i,o,p), then bind those to actions in the game. Thinking about it, `xdotool` is probably not the right tool for that without using `xbindkeys` at the same time.
Jason avatar
in flag
xbindkeys is not acknowledging my clicks? Any ideas?
Jason avatar
in flag
That's fine. Can you show me how to use those together? Do I just string them together in bash? Does there need to be a config file...?
Sebastian avatar
in flag
`xbindkeys` has a config file. I added a link to the project's webpage, that and the manpage should get you rolling. Also added how to identify your button's numbers.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.