Skip to content

Commit 594e3c2

Browse files
STRMLMylesBorins
authored andcommitted
doc: add readline.emitKeypressEvents note
PR-URL: #9447 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Gibson Fahnestock <[email protected]>
1 parent e65c9ec commit 594e3c2

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

doc/api/readline.md

+4
Original file line numberDiff line numberDiff line change
@@ -452,6 +452,10 @@ autocompletion is disabled when copy-pasted input is detected.
452452

453453
If the `stream` is a [TTY][], then it must be in raw mode.
454454

455+
*Note*: This is automatically called by any readline instance on its `input`
456+
if the `input` is a terminal. Closing the `readline` instance does not stop
457+
the `input` from emitting `'keypress'` events.
458+
455459
```js
456460
readline.emitKeypressEvents(process.stdin);
457461
if (process.stdin.isTTY)

0 commit comments

Comments
 (0)