readline and pageup/down

readline and pageup/down

Post by Samuel KOK » Sat, 08 Sep 2001 10:22:00



Hello,

I would like to be able to catch the pageup/down key in a term. The thing
is, I have to achieve it while using readline. Here is how go the
readline input instructions. I put a printf for debugging purpose.

        char c;
        ...
        <some code that reads c from a file descriptor>
        ...
        rl_pending_input=c;
        // debugging
        printf("the key was %u",c);
        rl_callback_read_char();
        ...

I wanted to use this in order to read the code corresponding to various
pageup/down. However, this only prints the escape char ^] (27), whatever
I type: pageup, pagedown, any arrow key, etc...

Readline has also been setup in the code to have a command history that
can be browsed using the up/down key, which actually works.

I thus assume that the code that correspond to the key I pressed in the
little lines above, is not entirely printed.

How can I "catch" these extra keys in this context?

I tried to use rl_bind_key and rl_generic_bind, without any success ;-(

Thx.

Sam.

 
 
 

1. PageUp/Down in vi in xterm?

I can't get my Page Up and Down keys to work when I'm in "vi"
in an "xterm" on my Linux machine?,

even though the Shift-PageUp/Down works to scroll the shell back,
and PageUp/Down works fine in other apps like "less",
and PageUp/Down works in X based applications like "netscape",
and "vi" works fine when running in a text session,
and all other keys work fine like arrows, delete and backspace.

My keyboard came from an IBM RS/6000, thought I should mention this.

Any ideas would be greatly appreciated?

2. Source code available?

3. How to change behavior of PageUp/Down Keys in xterm ?

4. Pathworks support 4 Linux?

5. Pageup/down emulation on Powerbook 3400

6. Setting Baud Rate from a Driver

7. Readline or not Readline...

8. RH6.0 Fail Detect PCnet-ISA AM79C960KC

9. Matrox Mystique ands X.

10. define Control+PageUp for curses program

11. Help : Solaris 1.1.1 PageUp/PageDown keys

12. Interfaces don't go down when network is physically down

13. HOw to use pageup and pagedown?