VT mouse mode causes clicks to display read-only pane popup #12464

Closed
opened 2026-01-31 03:16:25 +00:00 by claunia · 13 comments
Owner

Originally created by @DHowett on GitHub (Feb 8, 2021).

Windows Terminal version (if applicable): 1.7.391.0

The new read-only pane mode is great until mouse mode is enabled (check out vim, htop, mc in WSL)

Mouse events go straight into TrySendInput (or similar) which pops up a dialog. Every time you click. 😄

Originally created by @DHowett on GitHub (Feb 8, 2021). ```none Windows Terminal version (if applicable): 1.7.391.0 ``` The new read-only pane mode is great until mouse mode is enabled (check out vim, htop, mc in WSL) Mouse events go straight into `TrySendInput` (or similar) which pops up a dialog. Every time you click. :smile:
Author
Owner

@DHowett commented on GitHub (Feb 8, 2021):

If mouse position reporting is enabled, it happens every time you move to a new cell (!)

@DHowett commented on GitHub (Feb 8, 2021): If mouse _position reporting_ is enabled, it happens every time you move to a new cell (!)
Author
Owner

@DHowett commented on GitHub (Feb 9, 2021):

/cc @don-vito fyi for read-only stuff

@DHowett commented on GitHub (Feb 9, 2021): /cc @don-vito fyi for read-only stuff
Author
Owner

@Don-Vito commented on GitHub (Feb 9, 2021):

@DHowett - I kinda did this intentionally, as mouse click might modify the page.

@Don-Vito commented on GitHub (Feb 9, 2021): @DHowett - I kinda did this intentionally, as mouse click might modify the page.
Author
Owner

@DHowett commented on GitHub (Feb 9, 2021):

That's a fair choice. I'm worried that it'll catch people off-guard, because clicking in a pane will obscure the content & they may not be expected to know that the app asked for mouse mode.

The hover thing worries me a bit more. Hover tracking will make it impossible to mouse over the terminal without getting a dialog 😄

@DHowett commented on GitHub (Feb 9, 2021): That's a fair choice. I'm worried that it'll catch people off-guard, because clicking in a pane will obscure the content & they may not be expected to know that the app asked for mouse mode. The hover thing worries me a bit more. Hover tracking will make it impossible to mouse over the terminal without getting a dialog :smile:
Author
Owner

@Don-Vito commented on GitHub (Feb 10, 2021):

That's a fair choice. I'm worried that it'll catch people off-guard, because clicking in a pane will obscure the content & they may not be expected to know that the app asked for mouse mode.

The hover thing worries me a bit more. Hover tracking will make it impossible to mouse over the terminal without getting a dialog 😄

So just to make sure we are aligned on the principles:

  • No matter what we do not pass input to the connection, neither key, click nor hover (hover theoretically can also modify the content)
  • Said that, we need to make the notification less invasive

If we agree on the above, the next question how to make the notification less invasive. We can:

  • Show nothing (aka remove the dialog box completely)
  • Show some kind of info bar
  • Show the dialog as today on all occasions (key input / click) but not on mouse hover

WDYT?

@Don-Vito commented on GitHub (Feb 10, 2021): > > > That's a fair choice. I'm worried that it'll catch people off-guard, because clicking in a pane will obscure the content & they may not be expected to know that the app asked for mouse mode. > > The hover thing worries me a bit more. Hover tracking will make it impossible to mouse over the terminal without getting a dialog 😄 So just to make sure we are aligned on the principles: * No matter what we do not pass input to the connection, neither key, click nor hover (hover theoretically can also modify the content) * Said that, we need to make the notification less invasive If we agree on the above, the next question how to make the notification less invasive. We can: * Show nothing (aka remove the dialog box completely) * Show some kind of info bar * Show the dialog as today on all occasions (key input / click) but not on mouse hover WDYT?
Author
Owner

@zadjii-msft commented on GitHub (Feb 10, 2021):

Show the dialog as today on all occasions (key input / click) but not on mouse hover

That actually seems like it makes sense to me. I'm thinking of the case where I've got some tmux panes open, but the tab is read only. I try to click on one to focus it and OH NO IT DOESN'T FOCUS! THE TERMINAL IS BROKEN! - No, you just enabled read-only mode. That's why the mouse click didn't work.

Idk, that makes sense to me.

@zadjii-msft commented on GitHub (Feb 10, 2021): > Show the dialog as today on all occasions (key input / click) but not on mouse hover That actually seems like it makes sense to me. I'm thinking of the case where I've got some tmux panes open, but the tab is read only. I try to click on one to focus it and OH NO IT DOESN'T FOCUS! THE TERMINAL IS BROKEN! - No, you just enabled read-only mode. That's why the mouse click didn't work. Idk, that makes sense to me.
Author
Owner

@Don-Vito commented on GitHub (Feb 10, 2021):

Show the dialog as today on all occasions (key input / click) but not on mouse hover

That actually seems like it makes sense to me. I'm thinking of the case where I've got some tmux panes open, but the tab is read only. I try to click on one to focus it and OH NO IT DOESN'T FOCUS! THE TERMINAL IS BROKEN! - No, you just enabled read-only mode. That's why the mouse click didn't work.

Idk, that makes sense to me.

Yeah. Makes sense to me as well. @DHowett - any other thoughts? 😊

@Don-Vito commented on GitHub (Feb 10, 2021): > > > > Show the dialog as today on all occasions (key input / click) but not on mouse hover > > That actually seems like it makes sense to me. I'm thinking of the case where I've got some tmux panes open, but the tab is read only. I try to click on one to focus it and OH NO IT DOESN'T FOCUS! THE TERMINAL IS BROKEN! - No, you just enabled read-only mode. That's why the mouse click didn't work. > > Idk, that makes sense to me. Yeah. Makes sense to me as well. @DHowett - any other thoughts? :blush:
Author
Owner

@DHowett commented on GitHub (Feb 10, 2021):

Sure!

@DHowett commented on GitHub (Feb 10, 2021): Sure!
Author
Owner

@Don-Vito commented on GitHub (Feb 10, 2021):

@zadjii-msft - I am noob with VT. Can you guide me what is the simplest way to enable mouse position reporting?

Nevermind - found it 😊

@Don-Vito commented on GitHub (Feb 10, 2021): @zadjii-msft - I am noob with VT. Can you guide me what is the simplest way to enable mouse position reporting? Nevermind - found it :blush:
Author
Owner

@Don-Vito commented on GitHub (Feb 10, 2021):

Silenced the dialog on mouse move and wheel. Hope it is better now 🙈
ReadOnlyMouse

@Don-Vito commented on GitHub (Feb 10, 2021): Silenced the dialog on mouse move and wheel. Hope it is better now 🙈 ![ReadOnlyMouse](https://user-images.githubusercontent.com/4639110/107573274-fd8d7d80-6bf5-11eb-88a8-fa3f392cdf3b.gif)
Author
Owner

@KalleOlaviNiemitalo commented on GitHub (Feb 11, 2021):

In https://github.com/microsoft/terminal/issues/6981, I hoped that the read-only mode would suppress mouse reporting, as if the application in the session had not requested it:

Do not forward any mouse events to processes using the pseudoconsole. Instead, let mouse events scroll the scrollback and select text. This should override the ENABLE_MOUSE_INPUT mode and perhaps also ENABLE_QUICK_EDIT_MODE.

@KalleOlaviNiemitalo commented on GitHub (Feb 11, 2021): In <https://github.com/microsoft/terminal/issues/6981>, I hoped that the read-only mode would suppress mouse reporting, as if the application in the session had not requested it: > Do not forward any mouse events to processes using the pseudoconsole. Instead, let mouse events scroll the scrollback and select text. This should override the ENABLE_MOUSE_INPUT mode and perhaps also ENABLE_QUICK_EDIT_MODE.
Author
Owner

@Don-Vito commented on GitHub (Feb 11, 2021):

ENABLE_QUICK_EDIT_MODE

@KalleOlaviNiemitalo - you are right as usual. This would be a better experience, but it requires a change in the approach. I would suggest to advance with what we have and to open this as a follow up. The question is if what we have now is usable: the only mouse interaction you are allowed is scrolling and hovering.

@Don-Vito commented on GitHub (Feb 11, 2021): > ENABLE_QUICK_EDIT_MODE @KalleOlaviNiemitalo - you are right as usual. This would be a better experience, but it requires a change in the approach. I would suggest to advance with what we have and to open this as a follow up. The question is if what we have now is usable: the only mouse interaction you are allowed is scrolling and hovering.
Author
Owner

@ghost commented on GitHub (Mar 1, 2021):

:tada:This issue was addressed in #9107, which has now been successfully released as Windows Terminal Preview v1.7.572.0.🎉

Handy links:

@ghost commented on GitHub (Mar 1, 2021): :tada:This issue was addressed in #9107, which has now been successfully released as `Windows Terminal Preview v1.7.572.0`.:tada: Handy links: * [Release Notes](https://github.com/microsoft/terminal/releases/tag/v1.7.572.0) * [Store Download](https://www.microsoft.com/store/apps/9n8g5rfz9xk3?cid=storebadge&ocid=badge)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#12464