Monday, June 21, 2010

How To Create Custom Keyboard Shortcut Keys In Ubuntu

Ubuntu includes a very limited shortcut key configuration utility which doesn’t allow you to assign hotkeys to your own applications or scripts.
One of the best things about using Ubuntu which many users often overlook is that you can create your own shortcuts for practically any action that the system has to provide. This makes for a highly personalized user experience in which you set the environment and conditions for usage.To get around this limitation, we can use the built-in gconf-editor utility to assign them ourselves.
1. Open the terminal by navigating to Applications -> Accessories -> Terminal from the menu bar.

2. Type in gconf-editor and press Enter.
3. The Configuration Editor interface shows up. On the left-hand side panel, navigate to the following branch of the tree: apps -> metacity -> keybinding_commands.

4. When you click on keybinding_commands, the right-hand panel shows a list of commands (named command_1, command_2, etc.) with their corresponding description/documentation in the space below.
5. Right-click on command_1 – this controls the xkill action – and select edit key.
6. A small pop-up asks you to enter the new value for the key. Enter the new value as k – this will mean that the shortcut for this action from now on is Alt + k.
7. Click on OK.
8. Now go to the global_keybindings branch of the tree on the left-hand panel. [You will see it right above the keybinding_commands branch.]
9. In the list of commands on the right side, right-click on the name run_command_1, and select the edit key option.
10. Again, enter the same value as in Step 6 – i.e. k – and click on OK.
11. You will see that the value for the option run_command_1 in the global_keybindings is now changed to k.
12. Close the Configuration Editor.
Your new shortcut for the xkill operation is now in place. You can try this by opening a new program and the using the shortcut that you had set – Alt + k

No comments:

Post a Comment