Subject: Re: delete and backspace...
To: NetBSD-current Discussion List <email@example.com>
From: Greg A. Woods <firstname.lastname@example.org>
Date: 08/20/1999 01:16:40
[ On Wednesday, August 18, 1999 at 16:28:47 (-0700), Jonathan Stone wrote: ]
> Subject: Re: delete and backspace...
> That may be what you think but that doesn't make it a fact. If the
> key is the large one on the upper-right, used to erase the
> next-leftward character, and there's no adjacent equal-sized key
> labelled delete, then the standard DEC and Unix convention is to
> generate 0x7F -- even if (due to PC-industry stupidity) the key is
> labelled backspace rather than delete. Which is a *very* sensible
> default; just ask any Emacs user.
Sorry, but there is no one standard "unix" convention here. Unix, at
least since V7, has has had the ability to define which input character
causes the tty driver to do its "erase" handling. DEC != Unix, despite
the fact that I've got a bunch of PDP-11 gear in my garage purely
because that's what I first learned Unix on and I'm very fond of it.
If you want to be picky the only correct Unix convention is for the
erase char to be '#', just as it was in V7. IIRC the interrupt key was
hard-coded in V7 to be DEL (or "rubout" as it was more commonly known
then), and that's why most folks who got an early start with Unix will
ever set their erase character to DEL unless they cannot avoid it. Only
one major variant of Unix ever swung away from that convention until
Yes, a (hopefully larger sized) key near the upper right-hand corner of
the keyboard should probably cause the tty driver to do its "erase"
handling. However it is, to unix, irrelevant whether that key generates
an ASCII BS or DEL character provided the user has brains enough to set
their tty driver as appropriate for the terminal they are using.
FYI I am an Emacs fanatic (just check the headers in this e-mail), but I
have never ever used "DEL" as my "erase" character (either in Unix or
Emacs) unless the *keyboard* I am using cannot be reprogrammed. I used
Emacs before BSD had the "newcrt" tty driver (and thus before BSD made
the switch away from defaulting "stty erase" to '#').
However what Unix uses as a default erase character is not the issue. I
don't really care what anyone else prefers as their "erase" character
just so long as I never have to use their terminal sessions. From my
considerably lenghthy experience I've observerd that Unix vendors have
apparently traditionally chosen a default erase character to match that
of the most common keyboards they sold with their hardware (except AT&T
who steadfastly refused to give up '#'). The only concern I have is
that the terminal definition for the console emulation be at least sane
enough to specify the matching default erase character and that the
system endeavour to always set the erase character on the console tty so
that the key that most people will want to use as the "erase" key will
actually do the erase handling (even, or especially, in single user
The real issue, as I tried to explain in my previous responses, is the
fact that the key on a PC-style keyboard says "Backspace" and most sane
people will find it most natural to assume that this key will generate
the character code known as the ASCII "backspace" (0x8). The reason
this FAQ keeps coming up is because people do make this assumption.
That is reality.
Indeed any long-time PC user will assume that the "backspace" key
generates an ASCII BS (0x8) just as it does in MS-DOS (and the BIOS?).
*That* is reality.
It's just not possible to ship a replacement keycap with NetBSD.
> BTW, in your world, what char-code should be generated by a key
> labelled with a graphic '<X|' (delete-leftward icon) instead of
> an explicit 'backspace' or 'delete'? Hm?
In my world I re-program that key (at least on my NDC-108 keyboards) to
generate an ASCII backspace (unless it is shifted, then it's a DEL). I
also swap the "Ctrl" and "Lock" keys of course. Since they are almost
always used only as X-11 terminals I can do that quite easily with
xmodmap (using an input file generated conveniently by xkeycaps). For
those that I've physically re-labeled I do this with XDM just to avoid
confusion when other users us these keyboards.
However if I were writing a console driver for that particular keyboard
I would most definitely have that key generate a DEL by default. In
reality the NCD keyboard is a clone of a VT220-style keyboard, after all.
If you want the PC keyboard's "Backspace" key to generate a DEL
character in *your* world, then that's your business and it's realtively
trivial for you to explicitly reprogram the keycodes on *your* system(s).
If you expect me to use your keyboard though you'd better have
re-labeled the physical key so that I know what it generates!!!! ;-)
Greg A. Woods
+1 416 218-0098 VE3TCP <email@example.com> <robohack!woods>
Planix, Inc. <firstname.lastname@example.org>; Secrets of the Weird <email@example.com>