-
Notifications
You must be signed in to change notification settings - Fork 276
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
Raw keyboard capture with process.stdin doesn't work as expected. #50
Comments
Just tested the keypress package, same problem, It awaits an initial ENTER input, then it works normally. I think the deprecated calls are for the TTY object, they suggest to call process.stdin. which is what I do ?? Perhaps it's on my end? But it's the same on 2 computers. Windows 10 and Windows 8.1. I have a TUI lib that I was developing a year ago with node 0.10.0. But since I got back to it and decided to upgrade it to support the new nodes, that's where this problem came it. It worked perfectly with older node versions, which is something to make be believe that this is a bug? |
Yeah, the temporary solution is good, but It's a weird problem. Well alright then let me know if you wish further help. |
Will do, thanks! 😺 |
AFAIK, this is still an issue, should it be reopened as a bug on |
If anyone is still watching this issue, a fix is incoming: libuv/libuv#866 |
I'm having problems capturing Raw keyboard input in a terminal on windows. This is driving me crazy, because I know that I had implemented this with older versions of nodejs (a year + ago)
Using the latest versions of NodeJS (currently using 4.2.2), capturing input seems buggy.. Unless I am missing something?
What I am running:
What I am expecting:
Immediately after running, the program should react to whatever key is pressed, and output:
What I am getting:
After running the program, the first keyboard input, acts as if it is NOT captured in Raw and it is captured and displayed on screen.
Then when I press the ENTER key, the text I just typed gets pushed to the handler function, AND THEN the program will accept further input in raw as expected.
Looks like as if the program requires an ENTER keystroke to initiate a proper raw mode input mode?
pic related: I typed TEST (ENTER). Then the program works as expected.
I am developing a custom TUI so this functionality is crucial for me.
Anyone knows what is this all about? I can't find anything. Also I don't want to use any external libraries.
Thanks !!
The text was updated successfully, but these errors were encountered: