Closed flynxea closed 2 years ago
by the way, my terminal is MobaXterm
Hello @flynxea 👋
I'm sorry I don't know Byobu nor MobaXterm.
I also don't use the mouse with tmux.
From what I can see, the default bindings for MouseDown3Pane
are rather complex and I don't know how to advise you.
$ tmux lsk | grep MouseDown3Pane
bind-key -T root MouseDown3Pane if-shell -F -t = "#{||:#{mouse_any_flag},#{&&:#{pane_in_mode},#{?#{m/r:(copy|view)-mode,#{pane_mode}},0,1}}}" "select-pane -t= ; send -M" "display-menu -t= -xM -yM -T \"#[align=centre]#{pane_index} (#{pane_id})\" \"#{?#{m/r:(copy|view)-mode,#{pane_mode}},Go To Top,}\" < \"send -X history-top\" \"#{?#{m/r:(copy|view)-mode,#{pane_mode}},Go To Bottom,}\" > \"send -X history-bottom\" '' \"#{?mouse_word,Search For #[underscore]#{=/9/...:mouse_word},}\" C-r \"if -F \\\"#{?#{m/r:(copy|view)-mode,#{pane_mode}},0,1}\\\" \\\"copy-mode -t=\\\" ; send -Xt= search-backward \\\"#{q:mouse_word}\\\"\" \"#{?mouse_word,Type #[underscore]#{=/9/...:mouse_word},}\" C-y \"copy-mode -q ; send-keys -l -- \\\"#{q:mouse_word}\\\"\" \"#{?mouse_word,Copy #[underscore]#{=/9/...:mouse_word},}\" c \"copy-mode -q ; set-buffer -- \\\"#{q:mouse_word}\\\"\" \"#{?mouse_line,Copy Line,}\" l \"copy-mode -q ; set-buffer -- \\\"#{q:mouse_line}\\\"\" '' \"Horizontal Split\" h \"split-window -c '#{pane_current_path}' -h\" \"Vertical Split\" v \"split-window -c '#{pane_current_path}' -v\" '' \"#{?#{>:#{window_panes},1},,-}Swap Up\" u \"swap-pane -U\" \"#{?#{>:#{window_panes},1},,-}Swap Down\" d \"swap-pane -D\" \"#{?pane_marked_set,,-}Swap Marked\" s swap-pane '' Kill X kill-pane Respawn R \"respawn-pane -k\" \"#{?pane_marked,Unmark,Mark}\" m \"select-pane -m\" \"#{?#{>:#{window_panes},1},,-}#{?window_zoomed_flag,Unzoom,Zoom}\" z \"resize-pane -Z\""
bind-key -T root M-MouseDown3Pane display-menu -T "#[align=centre]#{pane_index} (#{pane_id})" -t = -x M -y M "#{?#{m/r:(copy|view)-mode,#{pane_mode}},Go To Top,}" < "send -X history-top" "#{?#{m/r:(copy|view)-mode,#{pane_mode}},Go To Bottom,}" > "send -X history-bottom" '' "#{?mouse_word,Search For #[underscore]#{=/9/...:mouse_word},}" C-r "if -F \"#{?#{m/r:(copy|view)-mode,#{pane_mode}},0,1}\" \"copy-mode -t=\" ; send -Xt= search-backward \"#{q:mouse_word}\"" "#{?mouse_word,Type #[underscore]#{=/9/...:mouse_word},}" C-y "copy-mode -q ; send-keys -l -- \"#{q:mouse_word}\"" "#{?mouse_word,Copy #[underscore]#{=/9/...:mouse_word},}" c "copy-mode -q ; set-buffer -- \"#{q:mouse_word}\"" "#{?mouse_line,Copy Line,}" l "copy-mode -q ; set-buffer -- \"#{q:mouse_line}\"" '' "Horizontal Split" h "split-window -c '#{pane_current_path}' -h" "Vertical Split" v "split-window -c '#{pane_current_path}' -v" '' "#{?#{>:#{window_panes},1},,-}Swap Up" u "swap-pane -U" "#{?#{>:#{window_panes},1},,-}Swap Down" d "swap-pane -D" "#{?pane_marked_set,,-}Swap Marked" s swap-pane '' Kill X kill-pane Respawn R "respawn-pane -k" "#{?pane_marked,Unmark,Mark}" m "select-pane -m" "#{?#{>:#{window_panes},1},,-}#{?window_zoomed_flag,Unzoom,Zoom}" z "resize-pane -Z"
Searched form Google and tried everything, seems this works. Don't know why.
set -g terminal-overrides 'xterm*:smcup@:rmcup@'
Could tmux be configured as Byobu when using mouse? I set mouse mode on, copy and paste works well. But when I scroll the middle key of the mouse, it acts like arrow key up and down, scroll the command history.
I just want it to be the style of Byobu, when scroll mouse middle key, enter copy mode. I searched in the internet, someone said that it's because the terminal send arrow up/down when scroll mouse.
But it works well when I use Byobu with the same terminal. And my Byobu bridged with tmux instead of screen.
thanks.