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/05/2007 23:49:28
mowestusa <mowestusa@yahoo.com> wrote:

> --- "Valeriy E. Ushakov" <uwe@stderr.spb.ru> wrote:
> > Since wscons "vt100" emulation really emulates
> > vt220'ish terminal, it
> > makes sense to keep 14 (<- or <X] or BackSpace)
> > mapped to Delete
> > (generating DEL) and 211 to KP_Delete (generating
> > \033[3~).
> > 
> > The first one matches default VERASE 0177, so
> > default mapping matches
> > default stty settings.  The latter is already
> > described by kD=\E[3~ in
> > termcap descriptions of vt220 &co, so it should do
> > the right thing and
> > provide working "delete-right" out of the box.
> 
> Above you seem to indicate that wscons out of the box
> should provide "delete-left" by pressing "backspace"
> key. It should also provide "out of the box" you say
> "delete-right" by preassing the "delete" key. This
> does not happen on my old Toshiba laptop.

I misedited the above, I meant "makes sense to keep 14 ... mapped to
Delete and *change* 211 to KP_Delete ..."


> After reading man wsconsctl it seems like you could
> remap the keys, but I have no idea what command would
> accomplish this from reading the man page, and how to
> make that stick each time you log into the console.
> Nor do I know if you can simply add a command to
> wscons.conf, to do this either. The man pages don't
> spell out that issue for me.

There's mapfile example in wscons.conf.  Just create your own mapfile
that has:

    keycode 211 = KP_Delete

and add

    mapfile /path/to/your/keymap

to wscons.conf

Don't forget to change your /etc/ttys file to set the terminal type
from vt100 to vt220 or wsvt25, otherwise vi will not know how to
interpret \E[3~ that your <Delete> key will generate.

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