Run the command xmodmap -pp
out put will be similar to like this
pratap@i7-6550U:~$ xmodmap -pp
There are 10 pointer buttons defined.
Physical Button
Button Code
1 1
2 2
3 3
4 4
5 5
6 6
7 7
8 8
9 9
10 10
pratap@i7-6550U:~$
this means when the Physical Button 1 is pressed the Button Code 1 function will be done which is just a mouse click. In your case you have pressed the middle mouse button first and then side buttons in which the middle mouse button is button 2, that is correct. left side and right side buttons should have a value of 6 & 7 (my guessing only)
in general left click, middle mouse button, right click, scroll down, scroll up are Physcial Buttons 1 to 5.
In your case you need to map Physical Buttons 6 & 7 to Button Codes 6 & 7.
run the command xmodmap -pp
and see what is showing for Physical Buttons 6 & 7
then run xmodmap -e "pointer = 1 2 3 4 5 6 7"
Example:
pratap@i7-6550U:~$ xmodmap -e "pointer = 1 2 3 4 5 6 7"
Warning: Only changing the first 7 of 10 buttons.
pratap@i7-6550U:~$
xmodmap -e "pointer = 1 2 3 4 5 6 7"
command works instantly but will not survive logout or reboot. add this command in start up applications Preferences once you are satisfied with this mapping.
when ever you want to go back to default behaviour, run xmodmap -e "pointer = default"
and delete the entry from start up application.
source: http://manpages.ubuntu.com/manpages/bionic/man1/xmodmap.1.html
Check what are the functions doing by pressing your mouse Physical Buttons in actual by clicking them.. if they are intended to do back/ forwarded out of the box, that's fine. If they do nothing. Map those keys to do back/ forward from this Q&A binding back/forward to mouse buttons
Edit:
According to the website of your mouse vendor
http://www.sentey.com/br/whirlwindx there should be a software for configuring side buttons but i did not find any link to it. Also the support for this mouse is only to the OS'es Windows & MacOs it seems.





Contenet in this Question or exended comments may give a clue similar to your situation. Ubuntu 18.04 how to disable power save?
xev | grep ',button'
the terminal shows that left sidebutton, right sidebutton and scroll has the same button number (2
) as show on my output console. So if i assing to my left sidebutton go back, then the righ sidebutton and scroll will go back too, because they have the same button number. – Mutante Apr 07 '19 at 06:35