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

After scrolling upward, scroll position jumps back to bottom, when using Parallels VM #8047

Closed
strw22 opened this issue Oct 26, 2020 · 4 comments
Labels
Area-Input Related to input processing (key presses, mouse, etc.) Area-TerminalControl Issues pertaining to the terminal control (input, selection, keybindings, mouse interaction, etc.) Resolution-Duplicate There's another issue on the tracker that's pretty much the same thing.

Comments

@strw22
Copy link

strw22 commented Oct 26, 2020

Environment

Windows build number: 10.0.19041.388
Windows Terminal version (if applicable): 1.3.2651.0

Any other software?
Parallels Desktop 16.0.1 VM running Win10

Steps to reproduce

  • Open Terminal
  • Type DIR, or some command to fill the window
  • Scroll upward using mouse-wheel
  • Switch from mac Parallels VM window to another mac window, say Finder (Cmd-TAB)
  • Switch from Finder back to Parallels VM window (Cmd-TAB)
  • Terminal scroll position jumps to the bottom (bug)

Expected behavior

Scroll position shouldn't change when Parallels window is re-gains input focus

Actual behavior

Scroll position jumps to the bottom, losing previous position

I tried using Spy++ to see if any windows messages are sent, but didn't see anything obvious. Any tools I can use to see what messages/input are being sent to Terminal?

@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 Oct 26, 2020
@zadjii-msft
Copy link
Member

Huh, that's super weird. That would seem to indicate that some sort of keyboard input event is getting sent to the Terminal, even if it's not echoing anything to the screen.

The following might seem convoluted, but it might be able to help us figure out what the key getting sent to the terminal is:

  1. enable debug features by adding "debugFeatures": true, to the global settings
  2. Hold both the left and right alt keys, and open a new tab. What you should see is a tab with two panes in it, and the second one will have the "debug tap", showing all the input and output sent to the Terminal, something like:
    image
  3. repro the issue
  4. copy the output in the second pane to this issue, (and maybe share a screenshot so we can differentiate between the output and input (the red text)

@zadjii-msft zadjii-msft added Area-Input Related to input processing (key presses, mouse, etc.) Area-TerminalControl Issues pertaining to the terminal control (input, selection, keybindings, mouse interaction, etc.) Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something labels Nov 13, 2020
@strw22
Copy link
Author

strw22 commented Nov 14, 2020

Hi Mike, here is the input info. Specifically, the part after C:\Windows\System32>

At that point, I used the mouse wheel to scroll upward. Then I switched focus away from Parallels, then back to Parallels by clicking the Parallels icon (to avoid touching they keyboard). Here is the resulting input: (also attached .txt)

␛[17;29;0;1;8;1_␛[17;29;0;0;0;1_␛[144;69;0;1;256;1_␛[144;69;0;0;256;1_␛[144;69;0;1;256;1_␛[144;69;0;0;256;1_␛[18;56;0;1;2;1_␛[44;84;0;0;2;1_␛[18;56;0;0;0;1_

Note: I don't remember seeing this problem in Terminal 1.2 or 1.3... but it's possible I also upgraded Parallels from 15 to 16.0 around the same time I updated to Terminal 1.4.

Terminal-scroll-input.txt

Terminal-Scroll-Input.png

@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 Nov 14, 2020
@zadjii-msft
Copy link
Member

Thanks for getting that to me! If we reverse engineer that gibberish, we can get the following INPUT_RECORDs that are being sent to the Terminal:

VKEY ScanCode Char Down? Modifiers repeat
17 VK_CONTROL 29 0 1 8 1
17 VK_CONTROL 29 0 0 0 1
144 VK_NUMLOCK 69 0 1 256 1
144 VK_NUMLOCK 69 0 0 256 1
144 VK_NUMLOCK 69 0 1 256 1
144 VK_NUMLOCK 69 0 0 256 1
18 VK_MENU 56 0 1 2 1
44 VK_SNAPSHOT 84 0 0 2 1
18 VK_MENU 56 0 0 0 1

HMMMMMMM That VK_SNAPSHOT is certainly sus

Is this #7395, but with snapOnInput? Which I think is actually #5366 / #7896, and might already be in PR ☺️ I certainly don't think that Parallels should be sending that key at all, but we shouldn't be jumping on it either.

/dup #5366

Thanks again for following up!

@ghost
Copy link

ghost commented Nov 16, 2020

Hi! We've identified this issue as a duplicate of another one that already exists on this Issue Tracker. This specific instance is being closed in favor of tracking the concern over on the referenced thread. Thanks for your report!

@ghost ghost closed this as completed Nov 16, 2020
@ghost ghost added Resolution-Duplicate There's another issue on the tracker that's pretty much the same thing. and removed 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 Needs-Attention The core contributors need to come back around and look at this ASAP. labels Nov 16, 2020
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Input Related to input processing (key presses, mouse, etc.) Area-TerminalControl Issues pertaining to the terminal control (input, selection, keybindings, mouse interaction, etc.) Resolution-Duplicate There's another issue on the tracker that's pretty much the same thing.
Projects
None yet
Development

No branches or pull requests

2 participants