Subject: Re: -key "introduction"
To: Zbigniew Baniewski <zb@ispid.com.pl>
From: Dan LaBell <dan4l-nospam@verizon.net>
List: netbsd-users
Date: 03/29/2005 19:19:11
On Mar 29, 2005, at 12:13 PM, Zbigniew Baniewski wrote:
> On Tue, Mar 29, 2005 at 11:31:19AM -0500, Thor Lancelot Simon wrote:
>
>> I don't understand what you're complaining about. On the console, I
>> can easily see that backspace generates ^H and delete generates ^?.
>> Whether your shell or applications are configured to treat these the
>> same way is hardly a problem that wscons should try to solve.
>
> But it's not "my" shell - it's a shell found on the NetBSD CD (every
> shell
> I tried: c, sh, bash, tcsh - not tried zsh nor ksh). So, what should I
> do,
It's most evident w/ programs like cat, ed, ex. They just use the tty
driver, so there's no question of readline() etc, or other shell
features,
getting in the way, trying to fix things.
> to make the shell (and applications) differentiate among "backspace"
> and
> "delete"? Currently I've got two "backspace" keys.
I was confused by what you meant earlier on in this thread, but I think
I get it, but its more like we have 3 delete-like keys.
1. RUBOUT/BACKSPACE/"delete"
2. grey pad del
3 number pad del
In cat, or ed,
ctrl-h produces ^h
the rubout/backspace erases
grey pad del erases
and number pad del ^[[3~
judging from stty erase is ^?. So I'm inferring grey pad del is
producing ^? . And if I do 'stty erase ^H', and cat again, both are
producing ^?
and not erasing. Which seems wierd, should be an esc sequences
shouldn't it? How could an console or ncurses program see those as
different keys?
( I should note that ksh accepts both as erase on command line )
I don't think any ascii teletypes had number pads... maybe they did...
I seriously doubt they had grey keys, the only 1 I've ever seen is the
one in movie _Andromeda_Strain_. I believe the whole erase is
backspace vs delete confusion started with introduction glass-ttys and
ctr-terminals, not printing terminals. Isn't ^? kill on printing
terms? (and xdm?).
Anyway my point is the grey delete key is much more modern, why is it
sending ^? ? I think w/ the grey keys, the meaning is forward delete,
or delete selection , and never erase. At any rate, I think they are
more application specific and not ancient teletype stuff and should be
sending some vt like sequence so ncurses, etc can grab it and
distinguish it from ^? or ^H.
Back to cat, if I type a grey insert I get ^[[2~, now if one
takes a look at wsemul_vt100_keys.c that corresponds to KS_KP_Insert
1 line below is KS_KP_Delete, which is ^[[3~ . My grey insert and my
keypad insert are sending the same thing, that ok, but why isn't my
grey
del key sending same as keypad del key? and how can I make so it does?