Path: utzoo!utgpu!watserv1!watmath!uunet!bu.edu!bu-cs!snorkelwacker!tut.cis.ohio-state.edu!usenet.ins.cwru.edu!eagle!news From: mikef@sarah.lerc.nasa.gov (Mike J. Fuller) Newsgroups: gnu.emacs Subject: Re: how to use emacs with 'backspace' as 'delete' Message-ID: <1990Feb3.183918.17186@eagle.lerc.nasa.gov> Date: 3 Feb 90 18:39:18 GMT References: <7813@chaph.usc.edu> Organization: NASA Lewis Research Center, Cleveland, OH Lines: 32 In article <7813@chaph.usc.edu> kondaman@aludra.usc.edu (Arjun Krishna Kondamani) writes: >To all you professional emacs programmers, a question from an amateur: > >I login to my unix account with an ADDS 2020 terminal. The location of >the 'backspace' and 'delete' keys is such that I prefer to use the >'backspace' key to delete text rather than the 'delete' key itself. I'm posting this because I have seen more than a few requests for this recently. Just put this in your .emacs file: (progn (setq keyboard-translate-table (make-string 128 0)) (let ((i 0)) (while (< i 128) (aset keyboard-translate-table i i) (setq i (1+ i))))) (aset keyboard-translate-table ?\^? ?\^h) (aset keyboard-translate-table ?\^h ?\^?) This will swap backspace and delete (^H and ^?) EVERYWHERE in Emacs. You can use a similar method to assign ^S and ^Q to other keys if you enable software flow control (via set-input-mode) and to assign Escape (^[) to another key if you lack an Escape key (vt200 type keyboard and some Macs). This changes the keys at a lower level than the key bindings and thus eliminates problems with local key bindings in some buffers like dired. /-----------------------------------------------------------------------------\ | Mike J. Fuller |Internet: mikef@sarah.lerc.nasa.gov |You'd be paranoid, | |----------------| mikef@zippysun.math.uakron.edu|too, if everyone | |/\/\/\/\/\/\/\/\|Bitnet: r3mjf1@akronvm |was out to get you!| \-----------------------------------------------------------------------------/