Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 25 Mar 1997 10:21:57 GMT
From:      brian@shift.lan.awfulhak.org (Brian Somers)
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: Backspace = ^H
Message-ID:  <199703251021.KAA28724@shift.lan.awfulhak.org>
References:  <5h2c01$4i2@reader.seed.net.tw> <5h6e83$1mk@ui-gate.utell.co.uk> <E7KvDC.ILE@nemesis.lonestar.org>

next in thread | previous in thread | raw e-mail | index | archive | help
In article <E7KvDC.ILE@nemesis.lonestar.org>,
	uhclem@nemesis.lonestar.org (Frank Durda IV) writes:
> Brian Somers (brian@shift.lan.awfulhak.org) wrote:
>: What's the argument for BS=^h ?
> 
>: Surely everyone agrees that since the dawn of time, dumb terminals
>: have sent ^? for the BS key.
> 
> Only if you bought them from DEC after 1979, circa VT100.
> 
> I've got (or had) a Beehive, ADM-3, Teleray 1060, Teleray 11M, ACT-V,
> a genuine DEC VT50, DEC VT52, DEC LA36 (DECwriter II), DEC LA120
> (DECwriter III), a GE Terminet KSR printer, Radio Shack DT-1, and a
> Wyse 75 (aka DT-100) AND ALL of these produce 0x08 when you hit the
> backspace key, just like the Teletype ASR33/35/37s all did,
> the original DUMB terminals.  So did the Singer terminals and a dozen
> brands long forgotten.   Few, if any, had an option for changing what
> code the backspace key produced away from 0x08.
> 
> Even Hayes AT-compatible modems recognize 0x08 as a backspace by default,
> not ^?.
> 
> Sending ^? for as a substitute for backspace came along much later in
> isolated equipment and as such is incompatible.
> 
> That's why in the ASCII chart 0x08 is called BACKSPACE.   :-)
> 
> Frank Durda IV <uhclem@nemesis.lonestar.org>|"The Knights who say "LETNi"
> or uhclem%nemesis@rwsystr.nkn.net           | demand...  A SEGMENT REGISTER!!!"
>					    |"A what?"
> or ...letni!rwsys!nemesis!uhclem	    |"LETNi! LETNi! LETNi!"  - 1983
> 

I didn't realize this (any dumb terminals I've seen have been vt100,
vt200 and vt220s, and looking in /etc/termcap (on 2.2) we've got
19 occurences of ^h and 1 of ^? :(

Still, I prefer the ^? idea, mainly for emacs reasons (are there
*any* other reasons?), but it's a pain in the ass getting syscons
& X to work like this on every machine.

The interresting "inconsistency" here is that the default erase
character is ^? and the default keyboard maps send ^? from
the DEL key - implying that it's "normal" to press DEL to rubout :(
Then, to compound matters, the default .profile comes with an
stty erase ^h (implying that someone decided it wasn't normal after
all but didn't want to disturb the status-quo too much) !

I think we should have no stty in any .profile, and either of the
following:

* The Backspace key sending ^? and a default stty erase char of ^?
* The Backspace key sending ^h and a default stty erase char of ^h

The DEL key would send whatever the Backspace key doesn't.

(I'd prefer BS=^?, DEL=^h)

Anything that deviates from the "default" needs to be stty'd in
a .profile somewhere.

-- 
Brian <brian@awfulhak.demon.co.uk> <brian@freebsd.org>
      <http://www.awfulhak.demon.co.uk>;
Don't _EVER_ lose your sense of humour !



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199703251021.KAA28724>