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 :-).

3 Answers 3


(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

  • 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! Aug 16, 2009 at 20:05

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

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

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.

  • Thanks, XHKeys does allow for this kind of customization. The customization works fine for gui and terminal application but it works erratically for web applications within Firefox :/ May 23, 2020 at 13:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.