Ask coding questions

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

For the repl
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 (2509) [earned 5 cycles]
View Answer
mat1 (2509)

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

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