I am primarily a keyboard person and like to have as many keyboard shortcuts as possible – I used a variety of tools for this end ranging from Autokey, GNOME-Do etc. Specifically, I was using AutoKey for many of keyboard shortcuts to invoke applications – eg Windows+g for gedit, Windows+c for Chrome and so on. The basic idea was to create a Autokey script and use Python’s subprocess module to invoke the application. For details refer my old blog post on AutoKey.
Recently, I bought a new laptop and did a fresh install of Ubuntu and other applications. I am still tweaking it to increase productivity. I noticed that GNOME now allows you to set arbitrary custom keyboard shortcuts in a easy fashion.
The way to add additional custom keyboard shortcuts used to involve muddying around with gconf-editor or xbindkeys. Now it is dramatically easier. Invoke System –> Preferences –> Keyboard shortcuts. You can use this window to modify keyboard shortcuts for certain preexisting entries – For eg I set starting a new terminal to Alt+F3 instead of Ctrl+Alt+T (see option ‘Run a Terminal’ under ‘Desktop’ in the shortcuts window).
To add a shortcut for arbitrary action that is not listed , click on “Add” button. You will get a new dialog with two entries : Name and Command. Let’s suppose I want use Window+g to start gedit. So in Name enter “Gedit” and in Command enter “/usr/bin/gedit” . Press “Apply” . Now you will see a new entry in the “Custom Shortcuts” section. You can click on the shortcut section and enter some keyboard shortcut. In my case, I entered “windows+g”. Typically, Windows key shows up as Mod4.
I like this new mechanism as it is much cleaner, intuitive and user friendly. I decided to write this post as most top results in Google for ‘custom keyboard shortcuts in Linux’ kept pointing users to solution using gconf-editor or xbindkeys. They do have a role , but I am sure most users will be will more than happy with this GUIsh way.