NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: backspace in wscons console sends ^H to processes



"Paul W. Rankin" <pwr%bydasein.com@localhost> writes:

> Based on our chats in #netbsd, I currently have in a wscons.conf
> mapfile:
>
>     keycode 57 = Cmd1 Control_L
>     keycode 42 = Cmd_ResetEmul Delete BackSpace
>
> And stty -a reveals erase=^? (without intervention on my part).
>
> This setup allows me to have the backspace key erase in both tty and
> `cat` et al. and have C-h call help in Emacs.

As additional background, IMHO all of this confusion arose from the
differing setups of DEC computers and the IBM PC.  On a real terminal as
one would have used with a PDP-11 or VAX in the 70s/80s/early-90s, the
key in the upper right that humans push to get rid of the last character
is labeled Delete or similar and sends ASCII DEL.  Some terminals had a
backspace key that sent ASCII BS, but BS was an output carriage control
character, and this key was often in the upper left, near the 1 and ~.

The IBM PC keybaord has a backarrow key in the upper right, where Delete
ought to be, and that world had it send BS (^H).  I don't know if that
was IBM mainframe culture, or an IBM PC invention, or something else.
That led, I think,  i386 unix (386BSD, then early NetBSD) to let the key
send ^H and configure erase to ^H, breaking emacs help compared to using
a real computer :-)

I've always tried to remap keys back to 'the key that is where Delete
should be sends ASCII DEL and erase is DEL'.

> Out of mere curiosity, how might I retain all this behaviour and also
> have C-h erase in `cat`, if that is possible?

I don't see that as possible, and I have no idea why you would want
that.  Once you have the key that is logically the delete key sending
DEL as original ASCII intended, you just use that for delete, don't use
any BS key, and type C-H in emacs for help.  What are you trying to
accomplish with this?   Or are you asking "is there some way to have
multiple characters function as erase in the tty"?

Greg

Attachment: signature.asc
Description: PGP signature



Home | Main Index | Thread Index | Old Index