On Linux Mint, mouse 4 and mouse 5 are automatically bound to go back and forward in the file manager, all browsers, settings, and probably elsewhere. I was wondering if it was possible to disable this functionality without completely disabling mouse 4 and mouse 5.

The reason for this is I use mouse 4 for push to talk, and having the browser or the file manager go back whenever I want to talk is extremely annoying.


You can remap the buttons with xinput

$ xinput This should list your input devices. Note the id of your mouse.

$ xinput get-button-map <mouse-id> (mouse id was 14 in my case)

This will print something like 1 2 3 4 5 6 7 8 9 10 11 12

$ xinput set-button-map <mouse-id> 1 2 3 0 0 0 0 0 0 0 0 0 0 0 0

This will disable all except the primary buttons.

Source: https://forums.linuxmint.com/viewtopic.php?t=241162

To persist the remap on reboot, create and save the following file-


Section "InputClass"
    Identifier  "<mouse-name>"
    Option  "ButtonMapping" "1 2 3 0 0 0 0 0 0 0 0 0 0 0 0"

source - https://askubuntu.com/a/407889/75357


The reason mouse buttons 4 and 5 go "back and forward" is that these are the mouse buttons that correspond to scroll wheel move events. So all applications that respond to scroll wheel events will respond to those buttons.

You can use the ButtonMapping option in the X evdev driver section of your xorg.conf file to map your "mouse 4" to another event, e.g. "button 6", and then configure "button 6" for push to talk.

See man evdev for details. Look at your Xorg.log to figure out if your configuration worked after restarting the X server.

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.