WaitForSingleObject seems to receive a key release event without releasing the key #13735
Replies: 1 comment 2 replies
-
Thanks for the report! So, this is one of those differences between the "terminal" model and the "console" model. When a key is input in a compliant terminal emulator (which Windows Terminal seeks to be), it is sent all at once: Therefore, to keep up the illusion of terminal compliance: when we translate that input for the Windows Console API, we turn that single Now, for a long string of input to a terminal emulator ( |
Beta Was this translation helpful? Give feedback.
-
Windows Terminal version
1.14.1962.0
Windows build number
10.0.19043.1889
Other Software
C source to reproduce the bug.
Steps to reproduce
Use a C compiler as Visual CL. Build the source code posted "Other Software" section. Run the application build on Windows Terminal and press a key without releasing it, a key press and key release event is generated continuously.
Expected Behavior
Key press generates an event where "KeyEvent.bKeyDown" is true.
Key release generates an event where "KeyEvent.bKeyDown" is false.
Actual Behavior
When key is press an event is sent having the "KeyEvent.bKeyDown" to true, afterwards it generates a key release event, "KeyEvent.bKeyDown" to false, and it continuously generating key press and key release events without releasing the key.
In Command prompt and Powershell it works as expected.
Beta Was this translation helpful? Give feedback.
All reactions