-
Notifications
You must be signed in to change notification settings - Fork 29.6k
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
keypress events not working in windows cmd.exe & powershell #5384
Comments
@egoroof What terminal are you using? |
This comment was marked as abuse.
This comment was marked as abuse.
possibly related report from nodeschool nodeschool/discussions#1641 someone needs to bisect this one, @nodejs/platform-windows can anyone repro? |
This comment was marked as abuse.
This comment was marked as abuse.
@egoroof if you can set yourself up with a development environment to compile and test Node on your Windows machine then you could help track down exactly where the bug was introduced. Unless anyone in here has a better idea of where we can narrow this down to. |
@egoroof if you could reproduce without external dependencies like |
This comment was marked as abuse.
This comment was marked as abuse.
if it is to do with streams then it may be in one of the commits that have touched the streams code since v5.5.0: 7684b0f stream: fix no data on partial decode Only the last two in that list were in between v5.5.0 and v5.6.0. You could try backing them each out and see if it makes a difference. Also, /cc @nodejs/streams |
the second to last one is the only one that actually changes anything so I somewhat doubt the problem lies there |
This comment was marked as abuse.
This comment was marked as abuse.
Thanks for investigating @egoroof, what we first need to do is figure out how on earth c-ares could be implicated on processing stdin on Windows, and if that is indeed the cause of the bug, how do we fix it? /cc @indutny @saghul (since you merged and reviewed that patch ... just in case you might have a clue here) |
Wow, this is a bit unexpected. I will take a look. |
That bisect result is weird. c-ares is not related in any way to how key presses are handled, which is done in libuv's tty handle. Unless it's some bizarre define?! |
From nodeschool/discussions#1641 (comment):
There's a network connection ... doesn't help much but perhaps adds a little bit of credence to the c-ares implication. |
The last issue didn't manifest on Windows 7. I think only 10 and possibly 8 were affected. Can someone verify? |
Tried to reproduce on Windows 10, Node.js 5.7.0 to no avail. @egoroof is it possible that your bisect is in error? I find it very hard to believe that a update to c-ares is really the cause. |
This comment was marked as abuse.
This comment was marked as abuse.
This comment was marked as abuse.
This comment was marked as abuse.
Hmm, maybe we can provide some kind of test build with that commit reverted so people who can reproduce can test it? |
I've done the bisect like @egoroof (Windows 10) Here my results:
|
I reverted a small hunk in c-ares and the problem disappears. Here the changes that I've done on f1a0827 diff --git a/deps/cares/src/ares_init.c b/deps/cares/src/ares_init.c
index 4607944..4c7eaf6 100644
--- a/deps/cares/src/ares_init.c
+++ b/deps/cares/src/ares_init.c
@@ -1068,6 +1068,10 @@ done:
*/
static int get_DNS_Windows(char **outptr)
{
+ /* Try using IP helper API GetAdaptersAddresses() */
+ if (get_DNS_AdaptersAddresses(outptr))
+ return 1;
+
/*
Use GetNetworkParams First in case of
multiple adapter is enabled on this machine.
@@ -1078,10 +1082,6 @@ static int get_DNS_Windows(char **outptr)
if (get_DNS_NetworkParams(outptr))
return 1;
- /* Try using IP helper API GetAdaptersAddresses() */
- if (get_DNS_AdaptersAddresses(outptr))
- return 1;
-
/* Fall-back to registry information */
return get_DNS_Registry(outptr);
}
|
PR-URL: #5090 Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
@orangemocha (and others) see #6806 Hopefully we will have the patched libuv in Node v4 once we sort out the stdout/err shenanigans. |
@martinheidegger the following SemVer range should hopefully match any
I did consider a runtime feature-detection approach, but some of the earlier reports made it seem non-deterministic. I'll put together a package to just do a SemVer comparison against the |
@martinheidegger here we go:
Feel free to let me know if it has any false-positives / false-negatives for you. :) |
Fixes: nodejs#4002 Fixes: nodejs#5384 Fixes: nodejs#6563 Refs: nodejs#2680 (comment) PR-URL: nodejs#6796 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Johan Bergström <bugs@bergstroem.nu> Reviewed-By: Myles Borins <myles.borins@gmail.com>
Fixes: #4002 Fixes: #5384 Fixes: #6563 Refs: #2680 (comment) PR-URL: #6796 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Johan Bergström <bugs@bergstroem.nu> Reviewed-By: Myles Borins <myles.borins@gmail.com>
Fixes: #4002 Fixes: #5384 Fixes: #6563 Refs: #2680 (comment) PR-URL: #6796 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Johan Bergström <bugs@bergstroem.nu> Reviewed-By: Myles Borins <myles.borins@gmail.com>
Fixes: #4002 Fixes: #5384 Fixes: #6563 Refs: #2680 (comment) PR-URL: #6796 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Johan Bergström <bugs@bergstroem.nu> Reviewed-By: Myles Borins <myles.borins@gmail.com>
Fixes: #4002 Fixes: #5384 Fixes: #6563 Refs: #2680 (comment) PR-URL: #6796 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Johan Bergström <bugs@bergstroem.nu> Reviewed-By: Myles Borins <myles.borins@gmail.com>
Fixes: #4002 Fixes: #5384 Fixes: #6563 Refs: #2680 (comment) PR-URL: #6796 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Johan Bergström <bugs@bergstroem.nu> Reviewed-By: Myles Borins <myles.borins@gmail.com>
Keypress doesn't work in Git Bash also. But it works fine with ConEmu64 (https://conemu.github.io/) for me on Windows 10. |
I make commits using cz-cli (it uses arrow keys for selection). Just updated node to 5.7.0 (from 5.6.0) on windows 10 and now arrow keys (upd also Ctrl+C and maybe something other) not working in command line. Pressing arrow keys does nothing (like keypress event doesn't happen).
Guess it related #2996.
The text was updated successfully, but these errors were encountered: