[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: libreadline problem (BS key)

On Mon, 6 Oct 1997, Galen Hazelwood wrote:

> Steve Dunham wrote:
> > It's somewhat reasonable to argue that xterm always uses ^H for the
> > BackSpace key, although I don't know why it would hurt to respect
> > the "stty" settings (is this an upstream issue?). I guess I'm just
> > going to have to set my xterms back to ^H (since readline ignores the
> > "stty" settings), I hope it doesn't break remote logins.
> Respecting the stty settings is not always wise.
> I only yesterday fixed problems that I've been having with vim under the
> new xterm.  With xterm-old, backspace worked fine.  Switch to xterm, and it
> stops working.  I tried to figure out what the critical difference was
> between the two entries, but got lost very quickly.  But then I noticed
> something odd that vim was doing when it started up: after it read the
> terminfo entry (using the old termcap compatability functions) it grabbed
> the stty information and changed the terminfo codes to match.

that's odd, sort of the opposite to my experience.

my BS and DEL keys *were* working perfectly.  BS deleted the character to
the left and I have no idea what the DEL key did because i never use it.

a few months ago i upgraded to hamm. this did something weird to BS
key interpretation....fortunately it was minor (to me).  In everything
*except* pine (and pico too), BS worked properly.  In pico and pine's
built-in editor, BS deleted the char to the right, but ^H worked
correctly.  I decided that this wasn't a problem to me because I always
use vim to edit my messages anyway.

i've upgraded to the most recent hamm several times since then.  The most
recent upgrade seems to have broken the BS key quite badly.  Now BS still
works in vim, still doesn't work in pine/pico, and also fails to work at the
bash prompt too.  Maybe there's a new /etc/inputrc or something.

this may have something to do with my .XDefault file, it contains the
following lines:

xterm.VT100.Translations:       #override \
        <KeyPress> BackSpace: string(0x7f)

which was the recommended way of fixing BS/DEL problems several months ago.

I commented this out a few days ago and the next time i log out (or more
precisely, the next time that netscape (kamikazescape :-) manages to
kill my X server and take out all my open windows with it) I'll find out
whether it makes any difference.

interesting. if i bring up a new xterm, the BS key just beeps at me but
if i then do 'su -l cas' then my BS key works properly. there's nothing
in my .bash_profile, .bashrc or even /etc/profile which could cause this
change (i tried sourcing them in a new xterm).  BS works fine if i telnet,
rlogin, or ssh to localhost too.

anyone know why there's a difference in inputrc behaviour for a login

it turns out that this is caused by the following in /etc/inputrc:

    $if term=xterm
    "\e[H": beginning-of-line
    "\e[F": end-of-line
    "\C-?": delete-char

if i comment out the delete-char line then BS works in bash
again.  I suspect that this is ultimately being caused by my
xterm.VT100.Translations line in .Xdefault - two fixes to the same
problem conflicting with each other.  i'll know soon enough.

all this is part of the price of playing with 'unstable', i suppose...


craig sanders
networking consultant                  Available for casual or contract
temporary autonomous zone              system administration tasks.

TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
debian-devel-request@lists.debian.org . 
Trouble?  e-mail to templin@bucknell.edu .

Reply to: