I wanted to program the side mouse keys to increase/decrease the volume (lazy penguin here).
I will need xbindkeys xvkbd and xev
sudo apt install xbindkeys xvkbd xev
We need to found the buttons in our mouse so
xev | grep ', button'
and now we need to assign them in my case 'amixer -D pulse set Master 5%+' for volume up ,we make a file .xbindkeysrc
nano ~/.xbindkeysrc
...and we create the assigned keys in that case side buttons are the button 9 and button 8 if your mouse have more you can assign them for all your favorite actions
#mouse volume up "amixer -D pulse set Master 5%+ " b:9 #mouse volume down "amixer -D pulse set Master 5%- " b:8now kill and restart the xbindkey
killall -s1 xkbindkeys xkbindkeys -f ~/.xbindkeysrcand enjoy ,you can also add in the startup programs so you dont need to run the command.