我知道我可以像我.zshrc
一样绑定钥匙
bindkey '^[u' "echo hi^J"
我想绑定一个命令以使终端向上滚动,就像当我按Shift+时一样PgUp。我该怎么做?我的终端是 Alacritty。
答案1
正如 tillyboy 指出的,这个问题必须在每个终端的设置中解决。这就是在我的机器上解决它的方法。
阿拉克里蒂
keybindings:
- { key: P, mods: Alt, action: ScrollPageUp, mode: ~Alt }
- { key: U, mods: Alt, action: ScrollPageDown, mode: ~Alt }
TMUX
# 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