I'd like to change <hold-SHIFT>-<PageUp> to a simple one-keystroke for scrolling in zsh in the terminal. So that I only have to press <PageUp> to scroll back. I currently have this partial keybinding for this: bindkey "^[[5~" That's the mapping for PageUp -- ^[[5~ -- but what word-command do I use on the right half of this line to accurately represent the action of holding the shift-key and then pressing the PageUp key?
On Tue, Apr 14, 2020 at 9:26 PM rj <rj@panix.com> wrote:
> I'd like to change <hold-SHIFT>-<PageUp> to a simple one-keystroke for
> scrolling in zsh in the terminal. So that I only have to press <PageUp> to
> scroll back.
Terminal scrolling is done by the terminal, not by zsh. To change the
key binding for scrolling, you need to look into your terminal's
settings. If your terminal doesn't allow you to change this binding,
there is nothing Zsh can help you with.
Roman.
On Tue, Apr 14, 2020 at 12:30 PM Roman Perepelitsa
<roman.perepelitsa@gmail.com> wrote:
>
> On Tue, Apr 14, 2020 at 9:26 PM rj <rj@panix.com> wrote:
> > I'd like to change <hold-SHIFT>-<PageUp> to a simple one-keystroke for
> > scrolling in zsh in the terminal. So that I only have to press <PageUp> to
> > scroll back.
>
> Terminal scrolling is done by the terminal, not by zsh. To change the
> key binding for scrolling, you need to look into your terminal's
> settings. If your terminal doesn't allow you to change this binding,
> there is nothing Zsh can help you with.
You might also find this binding in your windowing system (X11,
MSWindows) / window manager settings (Gnome, Xfce, etc.).
On Tue, 2020-04-14 at 15:24 -0400, rj wrote:
> I'd like to change <hold-SHIFT>-<PageUp> to a simple one-keystroke for
> scrolling in zsh in the terminal. So that I only have to press <PageUp> to
> scroll back.
>
> I currently have this partial keybinding for this:
>
> bindkey "^[[5~"
>
> That's the mapping for PageUp -- ^[[5~ -- but what word-command do
> I use on the right half of this line to accurately represent the action of
> holding the shift-key and then pressing the PageUp key?
If you're scrolling zsh in the terminal, that's a terminal command,
not a zsh command --- it's the terminal that manages scrollback.
I take it that is what you mean, you don't want to access the shell's
own history (which is indeed a "bindkey")?
How you do that varies depending on the terminal --- modern ones
have a menu for this, but if its xterm you need to use an Xdefaults
text file.
pws