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

Closed
opened 2026-01-31 02:40:37 +00:00 by claunia · 4 comments
Owner

Originally created by @strw22 on GitHub (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?

Originally created by @strw22 on GitHub (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?
claunia added the Area-InputResolution-DuplicateArea-TerminalControl labels 2026-01-31 02:40:37 +00:00
Author
Owner

@zadjii-msft commented on GitHub (Nov 13, 2020):

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 commented on GitHub (Nov 13, 2020): 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 <kbd>alt</kbd> 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](https://user-images.githubusercontent.com/18356694/99067818-f1e7d780-2570-11eb-9790-3e6cce8a96be.png) 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)
Author
Owner

@strw22 commented on GitHub (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

@strw22 commented on GitHub (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](https://github.com/microsoft/terminal/files/5539885/Terminal-scroll-input.txt) [Terminal-Scroll-Input.png](https://user-images.githubusercontent.com/53409149/99133023-2d17f400-25cd-11eb-94f6-c1230453f332.png)
Author
Owner

@zadjii-msft commented on GitHub (Nov 16, 2020):

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!

@zadjii-msft commented on GitHub (Nov 16, 2020): Thanks for getting that to me! If we reverse engineer that gibberish, we can get the following `INPUT_RECORD`s 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!
Author
Owner

@ghost commented on GitHub (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 commented on GitHub (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!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#11176