NetBSD-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: termcap issue
john%ziaspace.com@localhost (John Klos) 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.
When hitting the backarrow key ("backspace") on the Mac keyboard,
it apparently sends a DEL character. The terminal on the Mac probably
also defines the erase character as DEL.
The sshd on your NetBSD machine initializes the pseudo tty to use
the same erase character as the client.
The tset command in .login sees a valid terminal description and
initializes the erase character to what the terminal database
defines. For xterm-256color that is kbs=^H.
That behaviour changed when termcap was replaced with terminfo.
The tset command then was modified to almost always ignore the
kbs setting, which obviously broke local ttys and the console.
The old behaviour has now been mostly restored, so that tset works
again as documented and also identical to FreeBSD.
Mostly because the old code (from 4.4Lite) would never change
a ^? erase character except when passed on the tset command line.
This was fixed in FreeBSD in 1995.
There is more to it. Like what the keyboard driver maps the
backarrow key to (DEL on pckbd, BS on ukbd) or what keyboard
mapping a particular terminal emulator (xterm, KDE, putty, ...)
uses and how programs in raw or cbreak mode interpret tty input.
Greetings,
--
--
Michael van Elst
Internet: mlelstv%serpens.de@localhost
"A potential Snark may lurk in every tree."
Home |
Main Index |
Thread Index |
Old Index