Take the 2-minute tour ×

After doing some work in linux terminals, I got used to the Ctrl + h shortcut acting like the Backspace key.

Now I want to use this shortcut everywhere (not just in terminal).

This is easily done in Windows via Autohotkey, but I can't find a way of globally setting this behaviour on linux.

Most (GUI) applications do nothing after pressing the shortcut and some (I'm looking at you, Firefox) show a useless (for me) sidebar and screw the keyboard focus, which is a rather unpleasant slap in the face.

So, does anyone here know how can I globally map Ctrl + h to Backspace under X?

I tried to look at the xkb keymap files, but without success.

I'm using Gnome and Awesome at the moment, but if it can be done regardless of the window manager, all the better :-).

share|improve this question
add comment

3 Answers

up vote 2 down vote accepted

(better late than never)

It can be done for gtk applications:

Locate or create ~/.gtkrc-2.0

add the following line:

gtk-key-theme-name = "Emacs"

restart your gtk-app (pidgin. firefox etc) and you will be able to use ctrl-h ctrl-w and ctrl-u for deletion

share|improve this answer
In Ubuntu I had to set "/desktop/gnome/interface/gtk_key_theme" to "Emacs" using gconf-edidor to make this work, but, yeah, it does. Thanks! –  Tomas Sedovic Aug 16 '09 at 20:05
add comment

The default behavior for Ctrl+h is Backspace for ASCII-based systems and should not require (re-) definition.

share|improve this answer
But it still doesn't work like that under X window with most GUI apps like Firefox, Pidgin, etc. –  Tomas Sedovic Jul 21 '09 at 10:49
That's a per-application redefinition that particular programs (wrongly) make. –  Dennis Williamson Jul 21 '09 at 10:52
Hmm... and is there a way of preventing that? Besides modifying the applications themselves, I mean. –  Tomas Sedovic Jul 21 '09 at 11:09
From support.mozilla.com/en-US/kb/Keyboard+shortcuts - "Firefox does not provide any method of customizing keyboard shortcuts." –  Dennis Williamson Jul 21 '09 at 11:17
add comment

After quite a bit of Google searching, I found


which seems to be able to do quite that... There is a long manual there to, I only skimmed through that. So it's up to you to really verify if it works for you.

share|improve this answer
add comment

Your Answer


