Re: home/end/pageup/pagedown don't work

2000-02-25 Thread Jens Wilhelm Wulf

Hi David,
> Since the change is not taking effect, you apparently aren't changing
> the terminfo database..  ??
Well, I think I gave the correct instructions, but I may be wrong (in
another mail I described what I did).

regards, Jens



Re: home/end/pageup/pagedown don't work

2000-02-25 Thread David DeSimone

Jens Wilhelm Wulf <[EMAIL PROTECTED]> wrote:
>
> > That is, generate a file with infocmp, edit it, then compile that
> > file with tic.  Is that what you did?
> 
> Yes, I think so:
> ---
> infocmp $TERM > tmp.dat
> (edited the file)
> tic -c tmp.dat
> tic tmp.dat
> ---

Yes, but, you said this in your earlier message:

> I changed terminfo to ^[[5~ and so on as Marius suggested.  But
> "infocmp $TERM" still gives the same codes.

Since the change is not taking effect, you apparently aren't changing
the terminfo database..  ??

-- 
David DeSimone   | "The doctrine of human equality reposes on this:
[EMAIL PROTECTED]   |  that there is no man really clever who has not
Hewlett-Packard  |  found that he is stupid." -- Gilbert K. Chesterson
UX WTEC Engineer |PGP: 5B 47 34 9F 3B 9A B0 0D  AB A6 15 F1 BB BE 8C 44



Re: home/end/pageup/pagedown don't work

2000-02-25 Thread Jens Wilhelm Wulf

> In order to make changes to the terminfo database, you must run "tic". 
> That is, generate a file with infocmp, edit it, then compile that file
> with tic.  Is that what you did?
Yes, I think so:
---
infocmp $TERM > tmp.dat
(edited the file)
tic -c tmp.dat
tic tmp.dat
---

Jens



Re: home/end/pageup/pagedown don't work

2000-02-24 Thread David DeSimone

Jens Wilhelm Wulf <[EMAIL PROTECTED]> wrote:
>
> --
> infocmp $TERM:
> khome=\EOH, kend=\EOF
> knp=\E[6~, kpp=\E[5~
> 
> --
> cat > /dev/null:
> ^[[H
> ^[[F
> ^[[5~
> ^[[6~
> --
> emacs -nw:
> ^[OH
> ^[OF
> ^[[5~
> ^[[6~
> --

VT100 terminals have two "modes", application and normal mode.  The
application mode returns the "\EO" sequences, while normal mode returns
the "\E[" sequences.  I have no idea why this is done.  Ask DEC what
they had in mind.  :)

> So jed sees different codes for home/end (but they don´t work ;-)

The mode of the terminal is controlled by escape sequences being sent. 
You probably have ncurses putting the terminal into one mode, and slang
putting it into the other mode.

> I changed terminfo to ^[[5~ and so on as Marius suggested.  But
> "infocmp $TERM" still gives the same codes.  Did the change not work
> or are these things just different notations for the same codes?

In order to make changes to the terminfo database, you must run "tic". 
That is, generate a file with infocmp, edit it, then compile that file
with tic.  Is that what you did?

-- 
David DeSimone   | "The doctrine of human equality reposes on this:
[EMAIL PROTECTED]   |  that there is no man really clever who has not
Hewlett-Packard  |  found that he is stupid." -- Gilbert K. Chesterson
UX WTEC Engineer |PGP: 5B 47 34 9F 3B 9A B0 0D  AB A6 15 F1 BB BE 8C 44



Re: home/end/pageup/pagedown don't work

2000-02-23 Thread Jens Wilhelm Wulf

Hi Marius and others, 

many thanks for you trying to help me...sorrily none of the things worked
yet (some of them I´ve tried before).

To give facts, here´s a description of what certain programs see (sequence
of codes is always home/end/pageup/pagedown):

--
infocmp $TERM:
khome=\EOH, kend=\EOF
knp=\E[6~, kpp=\E[5~

--
cat > /dev/null:
^[[H
^[[F
^[[5~
^[[6~
--
jed:

ESC [ H
ESC [ F
ESC [ 5 ~
ESC [ 6 ~
--
emacs -nw:
^[OH
^[OF
^[[5~
^[[6~
--
typing : in jed an then they key I want to know about (tried CTRL,
shift and things like that instead of ESC, too):

home/end won´t display anything but stop the input, while
pageup/down just make mutt beep without closing the prompt
--

So jed sees different codes for home/end (but they don´t work ;-)

Is \E[5~ the same as \e[5~ and ^[[5~ ???
I changed terminfo to ^[[5~ and so on as Marius suggested. But "infocmp $TERM"
still gives the same codes. Did the change not work or are these things just
different notations for the same codes?

Whatever I try, mutt is the only program having problems. What I told about
jed can be solved, as jed sees a code and tells it to me

regards, 
Jens
-- 
Jens Wilhelm Wulf  ***  [EMAIL PROTECTED]  
  Interested in comfortable CD-burning under linux/X11?
   Take a look at: http://www.uni-karlsruhe.de/~um12/



Re: home/end/pageup/pagedown don't work

2000-02-23 Thread Dan Lipofsky

On Wed, Feb 23, 2000 at 10:06:30PM +0200, Marius Gedminas wrote:
> You should try hacking terminfo instead.  Use 
> $ infocmp $TERM
> and look at khome, kend, kpp and knp.  They should match the sequences
> your term is generating for Home, End, PgUp and PgDn respectively.

I just solved this for xterm on my RH 6.1 Linux box, by adding
the following to the vt100 entry:
khome=\EOH, kend=\EOF, knp=\E[6~, kpp=\E[5~, 

Those who do not have root permission or a cooperative sysadmin
can add the following to their .muttrc as a work around:

bind generic '[5~' previous-page   # Page Up
bind generic '[6~' next-page   # Page Down
bind generic 'OH' first-entry  # Home
bind generic 'OF' last-entry   # End

(In either case you must substitutes the actually codes
that your term emulator is generating)

> (keystrings is a small program whose sole purpose in life is to display
> nicely formatted character sequences.  I hacked it from examples in
> libc.inf).

Another way to see the codes is to start up emacs in the xterm (use
the -nw flag so it does not start up in its own window).  Go to the
scratch buffer and type ^Q followed by whatever key you want to see.
The xterm on linux was kind enough pass along the Home, End, PgUp and PgDn
keys to emacs so I could view them.  The xterm on Solaris was greedy,
grabbing them for itself, so this didn't work.

- Dan



Re: home/end/pageup/pagedown don't work

2000-02-23 Thread Marius Gedminas

On Tue, Feb 22, 2000 at 07:48:20PM +0100, Jens Wilhelm Wulf wrote:
> > in Mutt, you can press : for "enter command", and then press , and
> > then the key for which you want to see the char sequence.  The reason
> > why you need to press  is that the first character from your
> > home/pageup/whatever key is likely to be , and Mutt won't display
> > that -- but if it receives two 's, it will display the second on
> > the command line.
> shitdidn't workwhatever I type before those keys, it's always
> the same: home/end won't display anything but stop the input, while
> pageup/down just make mutt beep without closing the prompt.
> 
> Tried to hack around in the code a bit (mutt_getch in curs_libs.c) but now I
> know as much as before...however, I'll give up for now, there are much
> more important things to do. 
> Tried slang version 1.3.10 instead of 1.4, too.

You should try hacking terminfo instead.  Use 
$ infocmp $TERM
and look at khome, kend, kpp and knp.  They should match the sequences
your term is generating for Home, End, PgUp and PgDn respectively.

For example, Eterm 0.9 on my system is configured to send this:
$ keystrings
^D exits

\e[1~
\e[4~
\e[5~
\e[6~
\4

(keystrings is a small program whose sole purpose in life is to display
nicely formatted character sequences.  I hacked it from examples in
libc.inf).

If they don't match, you can redirect the output of infocmp to a file,
modify it and reinstall with `tic'.

Good luck.
Marius Gedminas
-- 
"Nobody will ever need more than 640k RAM!"
-- Bill Gates, 1981
"Windows 95 needs at least 8 MB RAM."
-- Bill Gates, 1996
"Nobody will ever need Windows 95."
-- logical conclusion