We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent dffafde commit efe7cccCopy full SHA for efe7ccc
doc/api/readline.md
@@ -362,6 +362,15 @@ Move cursor to the specified position in a given TTY stream.
362
Causes `stream` to begin emitting `'keypress'` events corresponding to its
363
input.
364
365
+Note that the stream, if it is a TTY, needs to be in raw mode:
366
+```js
367
+readline.emitKeypressEvents(process.stdin);
368
+if (process.stdin.isTTY) {
369
+ // might not be a TTY if spawned from another node process
370
+ process.stdin.setRawMode(true);
371
+}
372
+```
373
+
374
## readline.moveCursor(stream, dx, dy)
375
376
Move cursor relative to it's current position in a given TTY stream.
0 commit comments