VS community 2019 version 16.11.3 keystroke anomaly

Andrew Mercer 461 Reputation points
2021-09-19T15:34:44.2+00:00

Can anyone reproduce the following behavior? The setting is VS community 2019, the new version 16.11.3. Start with a nearly empty VB desktop forms app containing only this:

Public Class Form1
End Class

Place the editing cursor at a known position, for example, after the digit 1. Run the program (F5). Kill the program with a mouse click on the X in the upper right corner.

At this point, keystroke handling is confused. If I type letters, nothing happens as if the output pane were active but could not have input focus. But enter, backspace, and undo (^Z) have editing effect in the code pane. And up and down arrow produce a visual effect in the code pane, but the input cursor is missing. To get proper behavior, I must give focus to the code pane, usually with one mouse click, on occasion, two clicks.

The behavior after a build is as it was in earlier VS 2019 versions (and also VS 2017). After build, the output pane is active, and Esc activates and focusus the code pane. What is new is keystroke behavior after F5 run and program exit.

If no one can reproduce, I'll post my VS options that seem relevant. The workaround is easy enough, just get in the habit of mousing back into code editing as needed.

Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
4,774 questions
{count} votes

Accepted answer
  1. Andrew Mercer 461 Reputation points
    2021-09-21T17:53:47.303+00:00

    One more stab at this issue.

    Float the Output window, F5 run the program, mouse X to close the program. Then keystrokes go into the code pane, or you may need an Esc to deactivate output and raise the cursor in the code pane. All is well.

    Now, dock the Output window (but not as tabbed document), F5 run, and X close. At this point for me, keystrokes like letters are lost while some editing keystrokes are applied to the code pane. The cursor is not visible in the code pane until you click once (or twice) to activate it.

    If nobody can reproduce this, I'll accept something here and drop the issue.


1 additional answer

Sort by: Most helpful
  1. PengGe-MSFT 3,341 Reputation points
    2021-09-20T07:57:40.36+00:00

    Hi, @Andrew Mercer

    Welcome to Microsoft Q&A!

    I cannot reproduce your issue on my side.

    If I type letters, nothing happens as if the output pane were active but could not have input focus.

    When I close the window and type letters, everything works fine:
    133516-image.png

    My version of Visual Studio is 16.11.2, even if I upgraded to 16.11.3, the issue you mentioned did not appear.
    Have you installed third-party extensions that may affect input settings?
    *
    Update:
    I ran the same test in Visual Studio 2017. I pressed F5 to run the program, then killed the window program, hit some keys, and everything worked fine.
    133852-image.png
    Can you provide more information such as a video of this operation?

    Sincerely,
    Peng

    If the answer is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.