Ask coding questions

← Back to all posts
2
Why is keypress not working Nodejs
Vandesm14 (483)

For the repl https://repl.it/@Vandesm14/Terminal-Editor-Demo
It returns an object, and does not ask for input nor does it log the keypress to the console. What is wrong with the code?

Answered by mat1 (2242) [earned 5 cycles]
View Answer
Commentshotnewtop
2
mat1 (2242)

The default Node.js console currently. does not support getting key presses due to it using the old terminal. You can use the new terminal by using repl.run

Please upvote my comment if it was helpful or useful. Thanks!