Repository navigation
keypress events not working in windows cmd.exe & powershell #5384
Description
Activity
- addedreadlineIssues and PRs related to the built-in readline module.Issues and PRs related to the built-in readline module.windowsIssues and PRs related to the Windows platform.Issues and PRs related to the Windows platform.
on Feb 23, 2016 @egoroof What terminal are you using?
- changed the title
[-]arrow keys stopped working after update to 5.7.0[/-][+]arrow keys not working in windows cmd.exe[/+]on Feb 23, 2016 possibly related report from nodeschool nodeschool/discussions#1641
someone needs to bisect this one, @nodejs/platform-windows can anyone repro?
@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.
git bisectis a great tool to learn if you haven't before, you need to come up with a good test, manual or automatic, to tell you if a version of Node is broken or not then find a spot in the git history where it's not broken then usegit bisectto identify the actual commit where the breakage started and we can go from there.Unless anyone in here has a better idea of where we can narrow this down to.
eljefedelrodeodeljefe commented
on Feb 24, 2016 ContributorMore actions@egoroof if you could reproduce without external dependencies like
commitizenthat would be great. In the referenced issue, there are already examples. I can reproduce some. Trying to getgdbrunning on windows and hunt this bug down, too.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
f706cb0 streams: 5% throughput gain when sending small chunks
ee8d4bb stream: prevent object map change in TransformState
c8b6de2 stream: refactor redeclared variablesOnly 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
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.
93 remaining items
@martinheidegger the following SemVer range should hopefully match any
- known-broken:
>=4.0 <4.2 || >=5.0 <5.3 || >=5.6 <6.2 - known fixed:
<4 || >=4.2 <5 || >=5.3 < 6 || >= 6.2
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
nodeversion unless someone else beats me to it. :)- known-broken:
@martinheidegger here we go:
- https://github.com/jokeyrhyme/is-node-interactive-tty-broken
- https://www.npmjs.com/package/is-node-interactive-tty-broken
Feel free to let me know if it has any false-positives / false-negatives for you. :)
- added a commit that references this issue
on Jul 27, 2026
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.