Access Keys:
Skip to content (Access Key - 0)

How to fix emacs problems with Backspace or Delete

If your "delete" key on the terminal you're using isn't acting as you expect it to, it is likely that it is sending the "backspace" character instead of the "delete" character that is expected. This is a common problem with PC's and Macs. There are a few things you can do about this (in order of preference):

  • see if you can tell your terminal emulator (the communications program
    on your MAC or PC) to use "control-?" when you hit the "backspace" key.
  • you tell athena what to expect for the backspace key. To do this, put
    the following line in your .startup.tty file:

stty erase "^H"
or stty erase "^?"

depending on which of these you normally see when you hit your backspace

That will give you backspace capabilities in everything but emacs. In
emacs, add the following lines to your .emacs file (create one if you
don't have one, as above):

(setq term-setup-hook
'(lambda ()
(setq keyboard-translate-table "\C-@\C-a\C-b\C-c\C-d\C-e\C-f\C-g\C-?")
(global-set-key "\M-h" 'help-for-help)))

That will fix the backspace key, and set "M-h" to give you help
(regularly c-h does that).

IS&T Contributions

Documentation and information provided by IS&T staff members

Last Modified:

December 17, 2010

Get Help

Request help
from the Help Desk
Report a security incident
to the Security Team
olc-emacs olc-emacs Delete
emacs emacs Delete
backspace backspace Delete
delete delete Delete
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.
This product/service is:
Easy to use
Difficult to use

This article is:
Adaptavist Theme Builder (4.2.3) Powered by Atlassian Confluence 3.5.13, the Enterprise Wiki