Date: Tue, 25 Mar 1997 15:32:42 -0700 (MST) From: Terry Lambert <terry@lambert.org> To: brian@shift.lan.awfulhak.org (Brian Somers) Cc: freebsd-hackers@freebsd.org, andrew@erlenstar.demon.co.uk Subject: Re: Backspace = ^H Message-ID: <199703252232.PAA25997@phaeton.artisoft.com> In-Reply-To: <199703251456.OAA00459@shift.lan.awfulhak.org> from "Brian Somers" at Mar 25, 97 02:56:27 pm
next in thread | previous in thread | raw e-mail | index | archive | help
> 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". The ASCII DEL (0x7f) is an artifact of terminal devices which sent ^H for cursor left, ^J for cursor down, ^K for cursor up, and ^L for cursor right. These cursor controls were the result of holding down the control keys on multiplex keyboards (before your time, I'm sure) and using the "undercaps" (legends on the front rather than tops of keycaps). In other words, the "controls". This was echoed in hardware where the cursor motion controls became so popular as to merit their own keys on the keyboard (and when the cost/feature ration on keyactions dropped low enough to make such devices marketable. Basically, it a standard for vendors other than DEC: Televideo, ADM, Lear-Sieglar, QUME, Hazeltine, Wyse, etc. etc. The vi motion commands "hjkl" derive from these terminals, and the desire to maintain compatability with the older pre-independent key terminals. Since on these terminals, you could not distinguish a "cursor left" from a "backspace", to implement non-destructive spacing distinct from destructive erase left, DEL wa used. Not to be outdone, IBM jumped in with "BS = erase left, DEL = erase right". The theory is that they just wanted to be a pain in the ass to the rest of us for not switching over to EBCDIC when we "should have". EMACS is a child of DEC machines attached to DEC terminals, and follows in the good old shoes of IBM in their definition of ^H as help: "to be a pain in the ass to the rest of us when we didn't convert all of our terminals to ANSI so we could have seperate codes for the cursor keys distinct from the control keys". Remember: the people who brought you modern EMACS are the same people who made using "#pragma" in source compiled with GCC bring up "hack". > >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 ^?'. Except my backspace keys doesn't say "<-----", it says "<- BackSpace". I expect it to send a code in line with it's keycap. If you are going to argue for changing the code to not match my keycaps, then I will argue for changing the code emitted by the "Escape" key (which modern DEC terminals omitte because they wanted ANSI escape sequences processed in the terminal driver, and naked ESC characters make it onconvenient). That way, when I hit an "ESC" key (which currently sends an ESC character, apparently a bad thing, since it means the keycap and the code the key sends actually, God Forbid!, *match*), I won't have to wait a second while "vi" accounts for the possibility that the ESC is actually part of a sequence broken between packets over a long delay link. > Having "Delete" generate ^h is insane, and likely to confuse people > considerably. And having they keycaps on both the Delete and Backspace keys not match the actual codes the damn keys send is somehow *not* confusing?!?! Next, I suppose, we chould change "Tab" and "Enter" to send sequences seperate from ^T and ^M. Lucky for us the poor slobs who have "LF" and "FF" keys on their keyboards don't count for squat any more... Regards, Terry Lambert terry@lambert.org --- Any opinions in this posting are my own and not those of my present or previous employers.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199703252232.PAA25997>