Return to BSD News archive
Path: euryale.cc.adfa.oz.au!newshost.carno.net.au!harbinger.cc.monash.edu.au!munnari.OZ.AU!news.ecn.uoknor.edu!solace!nntp.se.dataphone.net!nntp.uio.no!newsfeed.nacamar.de!dispatch.news.demon.net!demon!erlenstar.demon.co.uk!erlenstar.demon.co.uk!not-for-mail From: Andrew Gierth <andrew@erlenstar.demon.co.uk> Newsgroups: comp.unix.bsd.freebsd.misc Subject: Re: Backspace = ^H Date: 25 Mar 1997 13:43:14 +0000 Organization: disorganised Message-ID: <87g1xkqe8d.fsf@erlenstar.demon.co.uk> References: <5h2c01$4i2@reader.seed.net.tw> <5h6e83$1mk@ui-gate.utell.co.uk> <E7KvDC.ILE@nemesis.lonestar.org> <5h8905$lj1@ui-gate.utell.co.uk> NNTP-Posting-Host: localhost X-NNTP-Posting-Host: erlenstar.demon.co.uk Cc: brian@awfulhak.demon.co.uk, brian@utell.co.uk X-Mayan-Date: Long count = 12.19.4.0.8; tzolkin = 11 Lamat; haab = 11 Cumku X-Attribution: AG X-Newsreader: Gnus v5.3/Emacs 19.34 Lines: 38 Xref: euryale.cc.adfa.oz.au comp.unix.bsd.freebsd.misc:37709 >>>>> "Brian" == Brian Somers <brian@shift.lan.awfulhak.org> writes: Brian> I think we should have no stty in any .profile, and either of the Brian> following: Brian> * The Backspace key sending ^? and a default stty erase char of ^? Brian> * The Backspace key sending ^h and a default stty erase char of ^h Brian> The DEL key would send whatever the Backspace key doesn't. Brian> (I'd prefer BS=^?, DEL=^h) DEL=^h ?? You have *got* to be kidding. This whole debate (which gets thrashed out regularly in comp.emacs) always originates from a confusion between destructive and non-destructive backspaces. The ASCII BS character (0x08) is, from the point of view of an output device, an instruction to move back one position, non-destructively. The ASCII DEL (0x7f) is an artifact of paper tape; a character can be erased from a tape by punching all the holes out, leaving a DEL, which is then ignored. (A vestige of this remains in some systems where DEL can be used for padding instead of NUL.) It's no more correct to use ^h as a destructive backspace than any other control character, whereas DEL has always been associated with the concept of "delete last input character". From a user's point of view, and assuming a PC keyboard, there are two keys to consider; the <- (backspace) key, and the "Delete" key. Normal user expectations require <- to behave as a *destructive* backspace, and "Delete" to be 'delete character forward' (kdch1 in terminfo-speek). This can best be achieved by having <- generate DEL, having "Delete" generate an escape sequence, and defaulting to 'stty erase ^?'. (Which is what I have done on my system, and have done in the past to many other Unix flavours, terminals and terminal emulators.) This leaves ^h free, which keeps Emacs happy. Having "Delete" generate ^h is insane, and likely to confuse people considerably. -- Andrew.