While mouse over on titlebar, allow to react to Ctrl+MouseScroll human-events on to active tab. #10325

Open
opened 2026-01-31 02:18:27 +00:00 by claunia · 3 comments
Owner

Originally created by @vini-nu on GitHub (Aug 27, 2020).

Description of the new feature/enhancement

Then mouse is over WindowsTerminal's titlebar, Ctrl+MouseScroll events should be handled the same way as mouse would be over inside terminal window.

I am using Windows Terminal with SSH client to connect to linux remotes. And then I open linux htop cli-utility I cannot rezoom Windows terminal.

Proposed technical implementation details (optional)

Ctrl+mouse_scroll should allow zoom-in/out currently active tab THEN mouse is over windows-terminal's titlebar's blank space.

Currently I need to exit htop to rezoom and then reenter htop.

To replicate original problem:

  1. Enter powershell via WindowsTerminal.
  2. Execute:
    $ ssh user@hostname -p 22 -i ~/.ssh/id_ed25519
    $ htop
  3. Try to rezoom with Ctrl+MouseScroll , you cannot.
  4. Exit htop by pressing Q.
  5. Now you can rezoom with Ctrl+MouseScroll in WindowsTerminal
Originally created by @vini-nu on GitHub (Aug 27, 2020). <!-- 🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨 I ACKNOWLEDGE THE FOLLOWING BEFORE PROCEEDING: 1. If I delete this entire template and go my own path, the core team may close my issue without further explanation or engagement. 2. If I list multiple bugs/concerns in this one issue, the core team may close my issue without further explanation or engagement. 3. If I write an issue that has many duplicates, the core team may close my issue without further explanation or engagement (and without necessarily spending time to find the exact duplicate ID number). 4. If I leave the title incomplete when filing the issue, the core team may close my issue without further explanation or engagement. 5. If I file something completely blank in the body, the core team may close my issue without further explanation or engagement. All good? Then proceed! --> # Description of the new feature/enhancement Then mouse is over WindowsTerminal's titlebar, Ctrl+MouseScroll events should be handled the same way as mouse would be over inside terminal window. I am using Windows Terminal with SSH client to connect to linux remotes. And then I open linux htop cli-utility I cannot rezoom Windows terminal. # Proposed technical implementation details (optional) <!-- A clear and concise description of what you want to happen. --> Ctrl+mouse_scroll should allow zoom-in/out currently active tab THEN mouse is over windows-terminal's titlebar's blank space. Currently I need to exit htop to rezoom and then reenter htop. To replicate original problem: 1) Enter powershell via WindowsTerminal. 2) Execute: `$ ssh user@hostname -p 22 -i ~/.ssh/id_ed25519` `$ htop` 3) Try to rezoom with _Ctrl+MouseScroll_ , you cannot. 4) Exit `htop` by pressing Q. 5) Now you can rezoom with _Ctrl+MouseScroll_ in WindowsTerminal
claunia added the Help WantedIssue-TaskPriority-3Area-InputProduct-Terminal labels 2026-01-31 02:18:27 +00:00
Author
Owner

@zadjii-msft commented on GitHub (Aug 27, 2020):

So this one's a little tricky - htop registers for mouse events, so when you ctrl+mouse scroll in htop, that's actually sending the input to htop, not the Terminal. That's why you can't zoom in/out while htop is open - the Terminal doesn't even get a chance at that mouse event.

Typically, shift is used as a modifier to "escape" the client mouse handling, and force the Terminal to handle the mouse event instead. However, I'm not sure if that'll work with Ctrl+scroll, since ctrl+shift+scroll is already bound to "change opacity" in the Terminal.

I wonder if there's a more clever solution beyond #1553 that we could use here...

@zadjii-msft commented on GitHub (Aug 27, 2020): So this one's a little tricky - `htop` registers for mouse events, so when you ctrl+mouse scroll in `htop`, that's actually sending the input to `htop`, not the Terminal. That's why you can't zoom in/out while `htop` is open - the Terminal doesn't even get a chance at that mouse event. Typically, shift is used as a modifier to "escape" the client mouse handling, and force the Terminal to handle the mouse event instead. However, I'm not sure if that'll work with Ctrl+scroll, since ctrl+shift+scroll is already bound to "change opacity" in the Terminal. I wonder if there's a more clever solution beyond #1553 that we could use here...
Author
Owner

@vini-nu commented on GitHub (Aug 27, 2020):

Then mouse is over WindowsTerminal titlebar, mouse events could be sent to WindowsTerminal specifically.
Then mouse is over terminal (inside), events could be sent casually as is now.

@vini-nu commented on GitHub (Aug 27, 2020): Then mouse is over WindowsTerminal titlebar, mouse events could be sent to WindowsTerminal specifically. Then mouse is over terminal (inside), events could be sent casually as is now.
Author
Owner

@zadjii-msft commented on GitHub (Aug 27, 2020):

Okay, I'm gonna tentatively say that this is a fine request. I guess we could register a mouse handler on the root of the Page, and if the mouse event isn't handled by the time that it bubbles up to the Page, then we could try tossing it back to the control to handle without VT processing.

A quirk of this will be that the TabView does handle mouse wheel events itself. It does this to scroll the list of tabs if there are too many for the width of the window. I'm not sure if it ignores them when there aren't that many tabs or not, but it's possible this will by a little janky.

@zadjii-msft commented on GitHub (Aug 27, 2020): Okay, I'm gonna tentatively say that this is a fine request. I guess we could register a mouse handler on the root of the Page, and if the mouse event isn't handled by the time that it bubbles up to the Page, then we could try tossing it back to the control to handle _without_ VT processing. A quirk of this will be that the TabView _does_ handle mouse wheel events itself. It does this to scroll the list of tabs if there are too many for the width of the window. I'm not sure if it ignores them when there aren't that many tabs or not, but it's possible this will by a little janky.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#10325