There are various ways to create custom key bindings/mappings in Linux, I’ll be using xbindkeys and Ubuntu in this tutorial. xbindkeys is a program that allows you to launch shell commands with your keyboard or mouse under the X Window System. It links commands to keys or mouse buttons, using a configuration file.
I have a ThinkPad and my keyboard has one of those blue buttons. Might as well put it to good use. I take a lot of screenshots, I’ll use it for that.
apt-get install xbindkeys
Create a configuration file for xbindkeys:
Identify the key to be used for launching the command:
xbindkeys --keyfollowed by pressing the (blue) button
1 2 3 4 5 6
4. Add key binding to the configuration file
5. Autostart xbindkeys (without arguments) on login. You can use the “Startup Applications” tool.