Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: zle page up / page down



"Jerry Rocteur" wrote:
> > 2009/1/27 Jerry Rocteur <macosx@xxxxxxxxxx>:
> 
> >> How do I change this shift page up / shift page down to page up / page dow
> n
> >
> > This has nothing to do with zsh and everything to do with your
> > terminal emulator.
> 
> So what you're saying is that you can't trap page up / page down in zsh.

Not exactly.

The emulator may or may not decide to handle those keys itself; that's
down to the way it's set up.  Most terminals *should* be able to do
this.  If it doesn't, then the shell can use those keys instead.

So it depends what behaviour you're expecting.  If you want to be able
to scroll back screenfuls to see what's there, then this is entirely the
terminal emulator's business and nothing to do with the shell at all.
If you want the terminal emulator to leave the keys alone so that you
can bind them to some function in the shell, then you need to configure
the terminal emulator to do that, and you will be able to bind them in
the shell by the usual tricks (e.g. type "read" and see what turns up
when you hit the key).

However, the first thing to do is establish whether what you're trying
to do is a terminal function or a shell function.  The most obvious use,
scrollback, is a terminal function.

-- 
Peter Stephenson <pws@xxxxxxx>                  Software Engineer
CSR PLC, Churchill House, Cambridge Business Park, Cowley Road
Cambridge, CB4 0WZ, UK                          Tel: +44 (0)1223 692070



Messages sorted by: Reverse Date, Date, Thread, Author