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

Re: Yet another suddenly-weird xterm



On Thu, Jan 10, 2002 at 11:30:16PM -0600, Ron Johnson wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> On Thursday 10 January 2002 11:04 pm, crispin@iinet.net.au wrote:
> > On Thu, Jan 10, 2002 at 10:26:41PM -0600, Ron Johnson wrote:
> > > Hi.
> > >
> > > Delete, Backspace, & the 4 arrow keys work, though.  And the 4
> > > questionable keys *do* work in curses programs like vim 6.
> > >
> > >   #  showkey -s
> > >   kb mode was XLATE
> > >
> > >   press any key (program terminates after 10s of last keypress)...
> > >   ^[[2~  #Insert
> > >   ^[[1~  #Home
> > >   ^[[4~  #Delete
> > >   # dumpkeys |grep Ins
> > >   keycode 110 = Insert
> > >   string Insert = "\033[2~"
> > >
> > > There are no entries for Home & End.
> > >
> > > Any thoughts?
> >
> > Are there entries for Home and End in the terminfo entry (infocmp)? What is
> > your $TERM set to? Does ctrl-A and ctrl-E work for moving to the start end
> > end of the lines?
> 
> Yes, ^A & ^E do work.
>   # echo $TERM
>   xterm
> 
> Are these the 2 terminfo entries for "end-of-line" & "home"?
>   el=\E[K
>   home=\E[H
> 
> # infocmp

snip...

Your termcap seems fine. I would suggest it may be a problem with the readline library that bash is using. Probably a bug or a problem in the build. It may also be the bash build. Try the following on the computer that is not recognising home and end. You can make any key perform any function this way.

type

vi /etc/inputrc

then go down to the end of the file and add a line

type "

then (this is important), press ctrl-V, you should get a little ^

then press home

then close the quote and finish the line. It should read

"^[OH": beginning-of-line

Do the same for end

"^[OF": end-of-line

exit the shell and spawn a new bash.

Does it work?

This however has the possibility of screwing up other terminals. So if you use other terminals (which will send different cooked characters for home and end) then you should encase the definitions in an if block. like...

$if term=xterm
"^[OH": beginning-of-line
"^[OF": end-of-line
$endif

info readline will give you more information, in particular the function and variable index will show you what you can bind key sequences to.

If this fixes it, then their is probably a bug in the bash or readline deb that your using. Let us know what the following gives

dpkg -l |grep bash

and 

dpkg -l |grep readline

so a bug report can be made

Kind Regards
Crispin



Reply to: