Subject: Re: Using the delete key to "right-delete" chars
To: None <netbsd-help@netbsd.org>
From: Geoff Wing <mason@primenet.com.au>
List: netbsd-help
Date: 10/01/2003 10:45:58
Julien Gabel <jpeg@thilelli.net> typed:
: I think another way is to use the following command:
: $ od -cx
: ^[[3~
: $

Right, or "hexdump -C" (which is like a basic program I wrote
maybe fifteen years ago and still use).  I'm very anti "od" and
its endian converting.

: I just noted that the corresponding control sequence is even different
: under the same shell, but if you use the "vi" or "emacs" edition command
: line mode.

The control sequence is created by the terminal program and terminal
programs don't usually care what foreground task is running.  Which shell
are you using and how did you evaluate this?

: Maybe is it possible to set the control sequence via stty(1) - like it is
: possible to do for the 'erase' sequence - but i don't succeed in this way
: for the moment.

That's not what stty is for and "erase" in stty means the keysequence sent
to erase the previous character (*).  The tty interface does process each
*single* character coming through from the user but the greatest extent of
that processing is to change characters (e.g. CR -> NL) not inject characters
into the stream (it may inject upto one extra character per NL when sending
back to the user).

(*) this only comes into effect in canonical mode.  Generally when you're
at the shell prompt you'll be in raw mode so most of the control characters
you're setting there won't be used anyway.

Regards,
-- 
Geoff Wing : <gcw@pobox.com>
Rxvt Stuff : <gcw@rxvt.org>
Zsh Stuff  : <gcw@zsh.org>