-
Notifications
You must be signed in to change notification settings - Fork 30.7k
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
on Windows10 only: stdin keypress event lost after escape pressed #38663
Comments
Unable to reproduce in MacOS, is it a windows-specific issue? Outputs
|
Yes it is! I tried on linux also and there is no issue. |
Almost same on windows 10 with node 12.16.1 and 12.16.2, after escape doesn't catch any enter.
With 14.17.0 first enter catched but second not:
|
yeah I tested last week and I saw the same weird behavior C:\Users\test1\code
λ node --version
v12.19.0
C:\Users\test1\code
λ node test.js
keytester 1
return | meta: false
keytester 2
return | meta: false
keytester 3
return | meta: false
C:\Users\test1\code
λ node test.js
keytester 1
escape | meta: true
keytester 2
return | meta: false
keytester 3
return | meta: false
C:\Users\test1\code |
I have tried the above mentioned issued with a small change and it works on Windows fine but I don't know why
|
If you do not call
|
Tested on windows Node v14.17.0
|
Thank you for the clarification. This works fine too
|
This issue has been stale for a long time, and there is a suggested workaround in the comments. I will close it now, but if you face similar issue feel free to reopen it or open a new issue. |
Description
After escape pressed and close the keypress event listener the second key press will be lost!
What steps will reproduce the bug?
esc
return
return
will be lost!What is the expected behavior?
return
have to be catched in keypress handler!The text was updated successfully, but these errors were encountered: