Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
215 views
in Technique[技术] by (71.8m points)

wsl 2 - How can I enter the copy mode when I scroll the mouse while using Tmux in MinTTY?

Scrolling the mouse while using Tmux in MinTTY, the command history is scrolled.
It seems that MinTTY converts mouse scroll event to up/down key.

In the past, I tried the following terminal with tmux2.1 or later, the terminal was automatically set to copy mode.

  • iTerm2
  • WindowsTerminal

The .tmux.conf options are all the same.
set -g mouse on

I want to stop sending up/down key when I scroll the mouse while using Tmux in MinTTY.
And if possible, I want to enter copy mode automatically like other terminals.

Current Environment:

  • Ubuntu20.04 on WSL2
  • MinTTY3.06(WslTTY,GitBash)
question from:https://stackoverflow.com/questions/65871543/how-can-i-enter-the-copy-mode-when-i-scroll-the-mouse-while-using-tmux-in-mintty

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

temporary solution:

I want to stop sending up/down key when I scroll the mouse while using Tmux in MinTTY.
add this line to ~/.mintty

SuppressMouseWheel=scrollapp

I want to enter copy mode automatically like other terminals.

Shift + MousuWheel worked.
Shift may depend on the [Options->Mouse->Modifier for overriding default] setting.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...