NetBSD-Users archive

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

Re: termcap issue



John Klos <john%ziaspace.com@localhost> writes:

> Sometime between RC1 and RC2, something happened to termcap. I often
> ssh from a Mac (TERM is xterm-256color) and nothing has changed on
> that end for ages. However, now on any NetBSD-7.0_RC2 system, the
> shell shows "^?" whenever a backspace is entered and the terminal is
> not interactive. Also, in insert mode in vi, one has to use control-h,
> as now backspace enters "^?". What changed? It'd be nice if this were
> fixed.

I haven't noticed a change, but in general there's a long-standing issue
about what these characters ought to be.

The basic issue is that originally, on DEC terminals (which were more or
less the reference hardware for UNIX), there was a delete key in the
upper right, often marked DEL, that one pushed to logically remove the
last character typed.  Then there was a BS key, upper left, that was
about carriage control.   Hence the erase character was 0177.

Then, PC keyboards had backspace where delete should be, and used it as
a delete key.  Because they said backspace, people on UNIX made them
send ^H, and then changed erase to ^H.

On my mac, typing the "delete" key (where DEL always was) to a shell
sends ^? (which is 0177), which acts as delete (as seen in stty -a).
That may because long long ago I unchecked "delete sends ^H".

So it sounds like you have delete set correctly on your mac and that the
NetBSD system is in erase=^H mode.

I remember having to do some work to make all this be ok (except that it
isn't ok on the NetBSD console without some patching).   There is some
complexity in conveying which character is erase from a machine with a
keyboard to a machine with a shell, and I agree it seems slightly fragile.




Attachment: pgpjRXtWcqHnq.pgp
Description: PGP signature



Home | Main Index | Thread Index | Old Index