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

742 Views Asked by At

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)
1

There are 1 best solutions below

0
On

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.