Skip to content
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

Mouse wheel scrolls backwards when set to "one screen at a time" #5610

Closed
sebfoucault opened this issue Apr 28, 2020 · 10 comments · Fixed by #6891
Closed

Mouse wheel scrolls backwards when set to "one screen at a time" #5610

sebfoucault opened this issue Apr 28, 2020 · 10 comments · Fixed by #6891
Labels
Area-TerminalControl Issues pertaining to the terminal control (input, selection, keybindings, mouse interaction, etc.) Help Wanted We encourage anyone to jump in on these. Issue-Bug It either shouldn't be doing this or needs an investigation. Priority-3 A description (P3) Product-Terminal The new Windows Terminal. Resolution-Fix-Committed Fix is checked in, but it might be 3-4 weeks until a release.
Milestone

Comments

@sebfoucault
Copy link

Environment

Microsoft Windows [Version 10.0.18363.720]
Windows Terminal 0.11.1121.0
Lenovo X1 Yoga
Logitech Mouse (M185)

Steps to reproduce

  • Open Windows Terminal
  • Open a shell (cmd, Powershell, ...)
  • Issue commands leading to the display of vertical scrollbar
  • Use the mouse wheel

Expected behavior

  • Mouse wheel should behave in Windows Terminal as it does in other system apps

Actual behavior

  • Mouse wheel scrolls in the other direction (rolling the mouse wheel upward scrolls down)

Suspecting potential conflicts with the Laptop touchscreen or trackpad i disabled them, but still observe the same behavior. I tried to look for parameters allowing to control the mouse wheel but did not find any.

@ghost ghost added Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting Needs-Tag-Fix Doesn't match tag requirements labels Apr 28, 2020
@zadjii-msft
Copy link
Member

When you use the mouse wheel in the legacy console (conhost.exe), does scrolling the wheel up move the buffer contents down / move the scroll position up? Or does it move in the opposite direction?

Does the Terminal scroll in the same direction as the legacy console?

@zadjii-msft zadjii-msft added Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something Product-Terminal The new Windows Terminal. labels Apr 28, 2020
@sebfoucault
Copy link
Author

When you use the mouse wheel in the legacy console (conhost.exe), does scrolling the wheel up move the buffer contents down / move the scroll position up? Or does it move in the opposite direction?

In connhost.exe, it is the other way around: scrolling the wheel up, move the scroll position up (toward the beginning of the console buffer)

Does the Terminal scroll in the same direction as the legacy console?

From the mouse wheel perspective, the behavior of the new Terminal is inconsistent with the one of the legacy console.

@ghost ghost added Needs-Attention The core contributors need to come back around and look at this ASAP. and removed Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something labels Apr 28, 2020
@PhMajerus
Copy link

Testing with a Microsoft Sculpt Ergonomic Mouse, the scrolling works in the correct direction in both conhost and Windows Terminal.
Could Logitech have some extra software that has a per-app customization?

@sebfoucault
Copy link
Author

Could Logitech have some extra software that has a per-app customization?

That is what i was initially suspecting but actually i don't have any Logitech-specific app installed.
The external mouse relies on the "default-driver" (assuming that this means something - i am not a driver specialist).

@WSLUser
Copy link
Contributor

WSLUser commented Apr 29, 2020

Works right for me using CMStorm mouse in my Windows VM.

@DHowett-MSFT
Copy link
Contributor

Were you one of the people for whom the older versions of Terminal just didn't let you scroll?

@DHowett-MSFT DHowett-MSFT added Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something and removed Needs-Attention The core contributors need to come back around and look at this ASAP. labels May 1, 2020
@sebfoucault
Copy link
Author

sebfoucault commented May 1, 2020

@DHowett-MSFT - No. The old version of Terminal just worked fine.

After more research, I think I found the root cause of the problem (can reproduce consistently on two different PCs):

  • The Windows mouse wheel configuration screen has two options for "Roll the mouse wheel to scroll": 1 - "One screen at a time" and 2 - "Multiple lines at a time"
  • The inversion occurs when the "One screen at a time" option is selected.

Paying more attention to this problem, i also noticed that some one of "MS Powerpoint" windows is subject to the same problem in the same "One screen at a time" configuration: on the left-hand side powerpoint displays thumbnails of the slides. The scrolling in this thumbnails window has the same inversion problem.

@ghost ghost added Needs-Attention The core contributors need to come back around and look at this ASAP. and removed Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something labels May 1, 2020
@DHowett-MSFT
Copy link
Contributor

Wow! Good find.

@DHowett-MSFT
Copy link
Contributor

Two bugs. We're storing the return value from SPI_GETWHEELSCROLLLINES as an int when it should be a uint, and we're ignoring WHEEL_PAGESCROLL (which once we store it in the wrong type comes out as -1).

@DHowett-MSFT DHowett-MSFT added Area-TerminalControl Issues pertaining to the terminal control (input, selection, keybindings, mouse interaction, etc.) Help Wanted We encourage anyone to jump in on these. Issue-Bug It either shouldn't be doing this or needs an investigation. Priority-3 A description (P3) labels May 1, 2020
@ghost ghost removed the Needs-Tag-Fix Doesn't match tag requirements label May 1, 2020
@DHowett-MSFT DHowett-MSFT removed Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting Needs-Attention The core contributors need to come back around and look at this ASAP. labels May 1, 2020
@DHowett-MSFT DHowett-MSFT changed the title Mouse wheel direction problem Mouse wheel scrolls backwards when set to "one screen at a time" May 1, 2020
DHowett added a commit that referenced this issue Jul 13, 2020
This parameter was added as a workaround for our fast trackpad
scrolling. Since that was fixed before 1.0 shipped, in #4554, it has
been largely vestigial. There is no reason for us to keep it around any
longer.

It was also the only "logic" in TerminalSettings, which is otherwise a
library that only transits data between two other libraries.

I have not removed it from the schema, as I do not want to mark folks'
settings files invalid to a strict schema parser.

While I was in the area, I added support for "scroll one screen at a
time" (which is represented by the API returning -1), fixing #5610.

Fixes #5610
DHowett added a commit that referenced this issue Jul 13, 2020
This parameter was added as a workaround for our fast trackpad
scrolling. Since that was fixed before 1.0 shipped, in #4554, it has
been largely vestigial. There is no reason for us to keep it around any
longer.

It was also the only "logic" in TerminalSettings, which is otherwise a
library that only transits data between two other libraries.

I have not removed it from the schema, as I do not want to mark folks'
settings files invalid to a strict schema parser.

While I was in the area, I added support for "scroll one screen at a
time" (which is represented by the API returning WHEEL_PAGESCROLL),
fixing #5610. We were also storing it in an int (whoops) instead of a
uint.

Fixes #5610
@ghost ghost added the In-PR This issue has a related PR label Jul 13, 2020
@ghost ghost closed this as completed in #6891 Jul 14, 2020
@ghost ghost added Resolution-Fix-Committed Fix is checked in, but it might be 3-4 weeks until a release. and removed In-PR This issue has a related PR labels Jul 14, 2020
ghost pushed a commit that referenced this issue Jul 14, 2020
#6891)

This parameter was added as a workaround for our fast trackpad
scrolling. Since that was fixed before 1.0 shipped, in #4554, it has
been largely vestigial. There is no reason for us to keep it around any
longer.

It was also the only "logic" in TerminalSettings, which is otherwise a
library that only transits data between two other libraries.

I have not removed it from the schema, as I do not want to mark folks'
settings files invalid to a strict schema parser.

While I was in the area, I added support for "scroll one screen at a
time" (which is represented by the API returning WHEEL_PAGESCROLL),
fixing #5610. We were also storing it in an int (whoops) instead of a
uint.

Fixes #5610
@ghost
Copy link

ghost commented Jul 22, 2020

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

Handy links:

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-TerminalControl Issues pertaining to the terminal control (input, selection, keybindings, mouse interaction, etc.) Help Wanted We encourage anyone to jump in on these. Issue-Bug It either shouldn't be doing this or needs an investigation. Priority-3 A description (P3) Product-Terminal The new Windows Terminal. Resolution-Fix-Committed Fix is checked in, but it might be 3-4 weeks until a release.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants