I know I can bind keys in my .zshrc like

bindkey '^[u' "echo hi^J"

I want to bind a command to make the terminal scroll up, like when I press Shift+PgUp. How can I do it? My terminal is Alacritty.


As tillyboy pointed, this must be solved in the settings of every terminal. This is what solved it on my machine.


  - { key: P,          mods: Alt,   action: ScrollPageUp,   mode: ~Alt         }
  - { key: U,          mods: Alt,   action: ScrollPageDown, mode: ~Alt         }


# scroll / copy mode (using alt+u, alt+p and movement keys
bind-key -n M-u copy-mode 
bind-key -n M-p copy-mode 
bind-key -T copy-mode-vi v send-keys -X begin-selection
bind-key -T copy-mode-vi y send-keys -X copy-selection-and-cancel
bind-key -T copy-mode-vi h send-keys -X cursor-left 
bind-key -T copy-mode-vi j send-keys -X cursor-down 
bind-key -T copy-mode-vi k send-keys -X cursor-up 
bind-key -T copy-mode-vi l send-keys -X cursor-right 
bind-key -T copy-mode-vi z send-keys -X page-down 
bind-key -T copy-mode-vi x send-keys -X page-up 
bind-key -T copy-mode-vi Escape send-keys -X cancel 

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.