Skip to content

Commit 2c1133d

Browse files
STRMLaddaleax
authored andcommitted
doc: add readline.emitKeypressEvents note
PR-URL: #9447 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Gibson Fahnestock <[email protected]>
1 parent a5f415f commit 2c1133d

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
@@ -457,6 +457,10 @@ autocompletion is disabled when copy-pasted input is detected.
457457

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

460+
*Note*: This is automatically called by any readline instance on its `input`
461+
if the `input` is a terminal. Closing the `readline` instance does not stop
462+
the `input` from emitting `'keypress'` events.
463+
460464
```js
461465
readline.emitKeypressEvents(process.stdin);
462466
if (process.stdin.isTTY)

0 commit comments

Comments
 (0)