18 lines
1.1 KiB
Plaintext
18 lines
1.1 KiB
Plaintext
# tmux >= 2.4 copy-mode key table and mouse-wheel/PageUp passthrough.
|
|
# Sourced conditionally from tmux.conf; see tmux/legacy.conf for older tmux.
|
|
|
|
bind-key -T copy-mode-vi PPage send-keys -X page-up
|
|
bind-key -T copy-mode-vi NPage send-keys -X page-down
|
|
bind-key -T copy-mode-vi WheelUpPane send-keys -X halfpage-up
|
|
bind-key -T copy-mode-vi WheelDownPane send-keys -X halfpage-down
|
|
bind-key -T copy-mode-vi v send-keys -X begin-selection
|
|
bind-key -T copy-mode-vi y send-keys -X copy-pipe "reattach-to-user-namespace pbcopy"
|
|
unbind-key -T copy-mode-vi Enter
|
|
bind-key -T copy-mode-vi Enter send-keys -X copy-pipe "reattach-to-user-namespace pbcopy"
|
|
|
|
# Let mouse wheel / PageUp pass through to apps using the alternate screen
|
|
# (vim, less, etc.) instead of always entering copy-mode
|
|
bind-key -T root PPage if-shell -F "#{alternate_on}" "send-keys PPage" "copy-mode -e; send-keys PPage"
|
|
bind-key -T root WheelUpPane if-shell -F -t = "#{alternate_on}" "send-keys -M" "select-pane -t =; copy-mode -e; send-keys -M"
|
|
bind-key -T root WheelDownPane if-shell -F -t = "#{alternate_on}" "send-keys -M" "select-pane -t =; send-keys -M"
|