At Wed, 31 Mar 2010 22:07:05 +0200, Johnny Billquist <bqt%softjar.se@localhost> wrote: Subject: Re: Backspace, Delete and other keys > > Greg A. Woods wrote: > > See, for instance, <URL:http://en.wikipedia.org/wiki/Backspace> > > Whoa! That page was rather revisionistic. :-) And worse they completely forgot to mention the use of backspace with whiteout, which being an English-speaking Canadian, was the primary reason I used the backspace key on a typewriter. :-) I suspect this meaning of using "backspace" to correct a mistake is very widely held, at least in primarily English-speaking regions. > Someone should send them the layout of a VT100 keyboard. No need -- I've got a real one in the garage. :-) It was a half-decent keyboard for the time, though the layout was a little bit annoying, especially the placement and size of the <CTRL> key. > There you have both a backspace key, and a DELETE key. Guess which sends > which code, and what was expected to happen when you pressed them. Well the way I used them on, say, originally BSD4.1 they worked exactly the way _I_ expected them to. :-) I liked having both those keys handy on a keyboard, and I rarely pressed the wrong one. They keyboard on the AT&T 5620 (dmd) terminal, my favourite terminal of all time, also has a "backspace" key and a "del" key in the top right corner of the main keypad. They did the right(tm) things too, but were ergonomically slightly better designed, at least for those of us who use "backspace" to correct/erase and "DEL" to interrupt. > > Sadly some East-coast folks were no help when they decided that > > <Control-H> was distinct from <Backspace>. :-) > > Hmm. I don't know at all who you are referring to now. Please enlighten me. Unless I'm mixing my metaphors the wrong way I refer primarily to GNU Emacs and the desire to have the "help" function bound to the somewhat logical <Control-H> key sequence, but I think it was more a MIT thing overall, which also influenced Digital Equipment Corporation's engineers. (Personally I find <Meta-?> to be a far more meaningful key sequence to use for finding "help" in Emacs, thus I don't have any problem with the fact the backspace key usually generates an ASCII BS. :-)) > Yes, in the way that there is no <Control-anything> in the ASCII table. > That's just a way to generate non-printable characters on most > keyboards. So most keyboards allows you to generate a BS, by pressing > ^H, the same way that you can press ^M as an alternative to pressing the > return key (assuming your keyboard sends a CR when someone press the > return key). Indeed, but again the big problem being for those people who want to use the <Control> key as a separate modifier key, and ideally (i.e. without ASCII in the middle) I'm sure they would have kept all <control-> key values separate from the ASCII "control" characters (i.e. the keys with names like "return" and "backspace" would generate the similarly named ASCII control characters, while the <Control-> modified keys would generate some entirely different values outside of ASCII, but then they also wanted a <Meta-> modifier too, and thus they ran out of bits on systems with 8-bit communications lines and had be satisfied with overlaying the <Control-> modifier on the ASCII control codes. Not that that's how it actually happened with terminal designs of course. > But apart from that, much confusion stems from the fact that people > don't distinguish between key labels, the codes they send, and how the > OS reacts when receiving them. Perhaps, though I contend most of it is a relatively recent invention. Also some confusion can be eliminated by being careful to use the correct terminology in this context, i.e. that used by tty(4). I'll try to do that here, but I'm bound to fail. :-) > Looking historically, most of these have sent the DEL character, with > the exception of the "Backspace" key, which usually sends BS. > And most any system accepted DEL as the code to delete one character to > the left. The vast majority of early ASCII terminals I have used over the years generated an ASCII BS (010) character when the key generally found in the same place as the "backspace" key on a typewriter was pressed, and generally the Unix tty(4) "erase" character would ideally be set to 010 to make full utility of this key. Of course there were the odd-balls, like one of the first CRT based "smart" terminals I ever used on a true Unix system (V7), the infamous Infoton 400, who's <Home> key generated an ASCII BS 010 character. It was built like a battle tank, and about as poorly designed for Unix (or any other interactive computing display task) as a tank is for a quiet residential street. > Unix originally had a totally different mapping. It used @ to delete a > line, and # to delete a character (unless I just accidentally swapped > them now). > Eventually people in general got tired of that idea, and wanted to use > those characters in their input. And also, since they were using > terminals common of that day, they shifted to using DEL to delete > characters. Well, that original mapping came from the use of an ASR-33 and similar printing terminals of course, where it was more convenient to use the lone "rub out" key to kill the current process (send it a SIGINTR), and since the original tty(4) driver didn't try to update the printout to show the effect of the erase character (over-striking would be kinda pointless anyway, if indeed the print carriage could even be backspaced by one character), a printed "#" was a clear indication to the user of how to figure out what was still in the input line buffer. Note from V7's tty(4) that receipt of an ASCII DEL (0177) character was hard-coded and could not be changed, unlike sg_erase and sg_kill, which could be easily changed with stty(1) to be any character. I.e. in Unix(tm) land, DEL has always meant send SIGINTR, and has never meant "erase" the character before the current position, and never could of course either, since its meaning was hard-coded in the tty(4) driver. On the West Coast the Berkeley folks invented newtty(4) and there made the default "erase" character be ASCII BS (010), likely to match what common "smart" CRT-based terminals were generating from the key positioned near to where the backspace key on a typewriter was placed. So, no, Unix people did not switch to using DEL to erase characters. Most anyone who had any experience with early Unix was unlikely to ever switch to using DEL to delete previous characters -- they were very well accustomed to using it as the interrupt character! It was only the people who started out with some experience with other systems where <Control-C> was the interrupt character, and who first encountered Unix-based systems _after_ the invention of newtty(4) or the somewhat similar tty(4) driver in Unix System III who sometimes chose to reconfigure their default settings to use ^C as their interrupt character, and only maybe then might they choose to use DEL as their erase character because some few terminals like the DEC VT100 _also_ had a DEL key conveniently located near to where the backspace key on a typewriter was located. I.e. Don't blame any of this on the IBM PC for goodness sake! It didn't help by mixing conventions so to speak (^C interrupts with ^H erase), but things were confused long before it came along. -- Greg A. Woods Planix, Inc. <woods%planix.com@localhost> +1 416 218 0099 http://www.planix.com/
Attachment:
pgpSZ89Tcp0v6.pgp
Description: PGP signature