First, install Solaar to see the battery level on the taskbar
sudo apt-get install solaarTo remap the keys, install
sudo apt-get install xbindkeys xautomationThen, launch xev to get the keyboard or mouse event to bind
xev
# grep button
xev | grep -i buttonCreate the configuration file for xbindkeys
nano ~/.xbindkeysrc
Here is an exemple of this file that map the Back and Forward buttons to BackSpace and Return respectively
# Back button => BackSpace
"xte 'keydown BackSpace'"
b:8
"xte 'keyup BackSpace'"
b:8 + Release
# Forward button => Enter
"xte 'keydown Return'"
b:9
"xte 'keyup Return'"
b:9 + ReleaseTo test your binding
xbindkeys -v
To start xbindkeys
xbindkeys
To find key code
xbindkeys --key
// or
xbindkeys --multikey
If you change the key map, you have to restart xbindkeys by following command
killall xbindkeys && xbindkeys