In Emacs, why does the Backspace key invoke help?
The Backspace key (on most keyboards) generates
ASCII code 8. C-h sends the same code. In
Emacs, C-h invokes the Emacs help command by default.
This is intended to be easy to remember since the first letter of
"help" is "h". One solution to this problem is to use
C-h (and Backspace) for help, and
Del (the Delete key) for deleting the
previous character. In some cases, however, this may be problematic:
- If you normally use
Backspaceoutside of Emacs for deleting the previous character typed, you can solve this by makingDelthe command for deleting the previous character outside of Emacs. The following command will do this on many Unix systems: stty erase '^?' - If you prefer to use the
Backspacekey for deleting the previous character because it is more conveniently located on the keyboard or because you don't have a separateDelkey, you can make theBackspacekey behave likeDel. Choose one of the following methods:
- Some terminals (e.g., VT3## terminals) have a setup menu that
will allow you to change the character generated by the
Backspacekey. - You may be able to get a keyboard that is completely programmable.
- Under the X Window System or on a dumb terminal, it
is possible to swap the
BackspaceandDelkeys inside Emacs by putting the following line in your.emacsfile: (keyboard-translate ?\C-h ?\C-?) - Another approach is to switch key bindings and put help on
C-x hinstead, by putting the following lines in your.emacsfile: (global-set-key [?\C-h] 'delete-backward-char) (global-set-key [?\C-x ?h] 'help-command) ;; overrides mark-whole-buffer
- Some terminals (e.g., VT3## terminals) have a setup menu that
will allow you to change the character generated by the
Other popular key bindings for help are M-? and
C-x ? .
Note: Don't try to bind Del to the help
command, because there are many modes that have local bindings of
Del that will interfere.
This information comes from the Emacs FAQ.
At Indiana University, to get support for personal or departmental Linux or Unix systems, see At IU, how do I get support for Linux or Unix?
Also see:
- For Emacs, where can I get documentation?
- GNU Emacs Quick Reference Guide
- Where can I find help with Emacs?
- For Emacs, where can I find information about binding keys?
Last modified on August 22, 2008.






