Create custom keyboard shortcuts in Linux

Most (if not all) users are aware of the ability to create keyboard shortcuts using the “Keyboard Shortcuts” menu in “Preferences.” However, most users are unaware that you can add any custom command to a keyboard shortcut in GNOME using gconf-editor. I will walk you through this process.

1. Launch gconf-editor by typing in a terminal gconf-editor.

2. In gconf-editor choose apps >> metacity >> global_keybindings.

3. In global_keybindings assign keyboard shortcuts (shown below).
Global keybindings

4. Select keybinding_commands (right below global_keybindings in the metacity menu).

5. In keybinding_commands assign the custom commands you would like to launch with the keyboard shortcuts you created in step three. This is shown below.
Keybinding commands

Now whenever you type the keyboard shortcut you’ve created, your custom command will be launched.

Trackbacks & Pings

Comments

  1. I am new here, just saying hello :)

  2. Nice site!

  3. Hi.

    Nice site design. Okay, I need your advice.
    So, I wanna make personal site, and I am looking for site template.
    Can you suggest some online catalog or other resource where I can find many site templates?

    It would be better if it will be free:)
    I think many of us have personal sites, do you design it yourself?

    Thx, Bill.

  4. @hillbilly I addressed your questions via email. Please let me know if you did not receive the email or if you have any other questions.

  5. @ucakkurzxg: Sure, we’ll give you a hand. What are your questions?

  6. Who can help me with .httpaccess ?
    where i can fined full information about .httpaccess file syntaxis?

  7. thanks much, bro

  8. Thanks Kyle! Great article!

  9. Hi,
    Is this blog still active?
    Two years later I have the following question:
    Can you configure Gnome (or X) so that a different keyboard shortcut can be used instead of Ctrl-C for copying the selection into the clipboard? I couldn’t find the option to do that in System – Preferences – Keyboard Shortcuts, or in gconf-editor, and Google has not helped much.

  10. Yes, this blog is still active and we post when we can, but I admit we’ve been super busy lately. IAE, Kyle, who wrote this particular article and founded the blog hasn’t been around for a while and i don’t have any answers for you off the top of my head. Maybe somebody else will chip in…

  11. The title “Create custom keyboard shortcuts in Linux” should be “Create custom keyboard shortcuts in Gnome”.. Ubuntu and Gnome != Linux (although they are both great!)

  12. i’ve been making keyboard shortcuts using this technique for quite some time and its always very very handy. My question is this: The command that i want my shortcut to launch is a command line app (e.g. top, vim…). Putting “top” as the command to execute does not work. I think i need to launch gnome-terminal and have it run top but i’m not exactly sure how to do this. Any thoughts?

  13. nevermind! figured it out! just put the command as “gnome-terminal -e “

  14. Great, but can get get closer to what AutoHotKey can do for us in Windows? That is, if I to Alt-G in kghostview, I want to send a certain key sequence. Stuff like that. Possible?

    Danke!

  15. hmmm tried this in lubuntu and there’s nothing in the tree for metacity. Metacity is installed though.

Post a Comment


Your email is never published nor shared. Required fields are marked *



© 2006-2007 Maxim Software Corp.  All rights reserved.