Issues with a couple of keys

Gert Doering gert at greenie.muc.de
Tue Mar 15 08:50:14 AEDT 2022


Hi,

On Mon, Mar 14, 2022 at 03:00:08PM -0600, Bob Proulx wrote:
> To help, and to confuse, the very popular bash command line shell
> accepts either BS or DEL for erase regardless of tty setting.  Which
> tells me that is not the command shell on the remote system.

This is actually a huge part of "the problem", because it hides 
misconfigurations - up to the point where you type something into
a program or a password prompt, and all of a sudden the "wrong"
delete-to-left character ends up as part of the typed-in sequence...

> To make this more useful for The Doctor try determining what erase
> character is being sent by your terminal emulator.  Set it to
> something different such as @ and then type into od and have it
> print out the raw hex value of the key from the keyboard being
> pressed.
> 
>     $ stty erase @
>     $ od -tx1
>     ^?    <-- Press the Backspace key, followed by Enter
>     ^d  <-- type in Control-D here to end input
>     0000000 7f 0a

$ echo <ctrl-v><the-key> | od -x1

also works and needs no "stty" change.

[..]
> In the old days we would have to put this in a case statement based
> upon our $TERM setting and other hints so as to select the right thing
> for that terminal.  Those were dark bad days indeed.  I had hoped to
> never see those days again hoping that DEL (^?) had won.

I'm in the ctrl-H camp :-)

gert
-- 
"If was one thing all people took for granted, was conviction that if you 
 feed honest figures into a computer, honest figures come out. Never doubted 
 it myself till I met a computer with a sense of humor."
                             Robert A. Heinlein, The Moon is a Harsh Mistress

Gert Doering - Munich, Germany                             gert at greenie.muc.de


More information about the openssh-unix-dev mailing list