-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Scrolling with mouse wheel in Windows Terminal isn't working unless you hold down Shift while scrolling #99
Comments
Are you setting The basic issue is that mouse events are either handled by Terminal or by Yori (never both.) In conhost, Yori can see the entire history within the window, so it can handle mouse wheel events and move the viewport. In Terminal, this information is not provided, so Yori has no way to respond to mouse wheel events. See microsoft/terminal#10191 and in particular microsoft/terminal#10191 (comment) (the Edit: text at the end.) Holding down Shift tells Terminal to handle the events and not send them to Yori, which is why that works. The issue about Ctrl+click and selection is related. Because Terminal doesn't let applications see anything that's not part of the current viewport, there's no way for Yori to handle Ctrl+click except for regions that are currently visible (without scrolling.) Yori gives you the choice about which process should handle the mouse, and realistically if using Terminal, Terminal should handle mouse events. It currently doesn't provide enough support for Yori to handle them well. |
Thanks for your response @malxau - appreciate it - yes I have Regarding holding down shift to tell Terminals to respond to events and not send them to Yori, are you aware of any way to do the opposite, i.e. have Terminals handle events unless I hold down an additional shortcut key, in which case Yori would handle the events? If so then that would provide the best of both (in my case at least), I'm not married to ctrl being the modifier for selecting values, holding down ctrl+shift as an example when needing to select values with the mouse wouldn't be much of an issue in terms of usability. |
I'm afraid I don't know of key combinations to have Terminal handle mouse events by default and only send them to applications via a key modifier. You might want to ask the Terminal folks if one exists - I don't see it in their documentation but they may already have it or be open to creating one. |
I'm not sure if this is due to some settings on my machine or what, but when using Yori within Windows Terminal, I'm unable to scroll up or down using the mouse wheel, however, if I hold down the Shift key and then scroll with the mouse wheel then it works, though when scrolling while holding Shift it seems that highlighting, selecting text, ctrl+click, etc. do not work if the text is in an area that is not within the current active area (i.e. not within the area displayed on screen before you scrolled up) - may want to break this behavior out to a separate issue. I do not see this behavior when using cmd or posh within WT, or when running Yori as a stand alone executable, only when running Yori within WT.
Yori version: 1.60
Windows Terminal version: 1.10.2383.0
The text was updated successfully, but these errors were encountered: