Subject: Re: An old unix Issue the Delete key how do you fix it
To: None <netbsd-help@netbsd.org>
From: Valeriy E. Ushakov <uwe@stderr.spb.ru>
List: netbsd-help
Date: 05/03/2007 13:37:41
mowestusa <mowestusa@yahoo.com> wrote:


> From what I understand from the responses to my
> question, NetBSD has set up their keyboard to function
> in console to behave like a terminal keyboard attached
> to Unix machines.

IIRC, default wscons keymap maps both the "<-" key in the upper right
corner of the main block (scancode 14) and the "Delete" key in the 2x3
editing block (scancode 211) to produce ASCII character DEL (127).  So
programs just cannot distinguish the two keys with the default keymap.

You can arrange for wscons keymap to be loaded on startup that changes
key 14 to be Backspace (generating ASCII BS) and key 211 to be
KP_Delete (generating "\033[3~").  See wscons.conf(5)


> On those keyboards you had no
> "backspace" but instead had a "delete" key in that
> location that carried out the function of
> "delete-left". You had no way to "delete-right" on
> those old terminals.

I think you are confused.  "delete-right" or "delete-left" are actions
that program performs in response to certain key presses (in the case
of terminal - bytes coming from the tty).  Of course you was able to
"delete-right", it all about how your programs are configured.
Programs use TERM environment variable to make a lookup in termcap (or
terminfo) terminal description database to get information about byte
sequences generated by various keys.  Programs that don't use
termcap/terminfo usually have some other way of tuning themselves to
specific terminal (e.g. "$if term=foo" in ~/.inputrc).

SY, Uwe
-- 
uwe@stderr.spb.ru                       |       Zu Grunde kommen
http://snark.ptc.spbu.ru/~uwe/          |       Ist zu Grunde gehen