Abstract: As an Ubuntu user, sometimes you want to use the function keys from a mouse, for example, the Logitech ones. However, there is no such a software offered by their website to do the same thing as in Windows. This blog will give a quick instruction on how to set it up.
To use the feature on Ubuntu, you need install XEV, it may come with the system, if not, install it.
sudo apt-get install xbindkeys xautomation xbindkeys --defaults > $HOME/.xbindkeysrc gedit ~/.xbindkeysrc
This will create your keybinding config file, after open it type
xev in a terminal, it will pop up a small window and you should move your mouse into the window then click the key you want and finally confirm the key number on your terminal outputs.
My script for a Logitech M570 trackball mouse. Copy this to the
~/.xbindkeysrc if you like.
## Mouse lower button trace back to last page "xte 'keydown Control_L' 'keydown Shift_L' 'key Tab' 'keyup Shift_L' 'keyup Control_L'" b:8 ## Mouse upper button close current tab "xte 'keydown Control_R' 'key w' 'keyup Control_R'" b:9