How do I get my backspace and delete keys to work the way I want?

On unix, the stty command is generally used to set the mappings of terminal keys like the erase key, word erase key. Typically this done in the .login file with a line like:

   stty intr '^c' erase '^h' werase '^w' kill '^u'
This will map ctl-c to the interrupt character, backspace to the erase character ctl-w to the word erase character and ctl-u the the line kill character. If you prefer delete as your erase key replace the '^h' with '^?' in the above command.

Unfortunately the .logon file is not generally executed when you start an xterm on a given system. That is why the xterm program has a X-resource called ttyModes. If you load the following X resource in your server then these keys will be mapped this way for all systems you visit:

   XTerm*ttyModes: intr ^c erase ^h weras ^w kill ^u
This way you do not need to change your .login files on all systems on which you have accounts or concern yourself with conflicts in system defaults.


University of Delaware
June 5, 1994