7

I just installed ubuntu 18 on my PC and id like to know if there's a tool to remap my mouse side buttons to work as they were a key from keyboard. I used to use X-Mouse Button Controll on Windows but i can't find a alternative option to ubuntu.

My side buttons are shown in "xev" command as button 14 and button 15 and id like to lets say: press button 14 and it act like i pressed key 4 from keyboard, press button 15 and act like i pressed key 5 from keyboard.

The reason i want that is because i need a hotkey but the game does not recognize these side buttons.

thanks in advance!

4

For anyone who has the same problem: I just achieved my goal using XTE, i found the solution after almost a week searching. Found this website https://matmunn.me/post/binding-volume-control-mouse-buttons-ubuntu/

It consists in installing xbindkeys and xautomation packages, in my case it was already installed, don't know if it's a default package. Next you need to edit a file called xbindkeysrc with comand:

xbindkeys --defaults > ~/.xbindkeysrc

or

touch ~/.xbindkeysrc

all you need to do is to write there is a block of code that tells the system what to do if you press a particular key wether its a Mouse button or a Keyboard key. The code looks like this.

# button 8

"xte 'key 5'" b:8 witch means, whenever you press "Button 8" (witch is a side button on my mouse) act like i have pressed the keyboard "Key 5" . You can use the comand xev to check what is the number of your mouse's button. Hope this can help other with the same problem.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.