Skip to content

Commit

Permalink
doc: add readline.emitKeypressEvents note
Browse files Browse the repository at this point in the history
PR-URL: #9447
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
  • Loading branch information
STRML authored and MylesBorins committed Sep 19, 2017
1 parent e65c9ec commit 594e3c2
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions doc/api/readline.md
Original file line number Diff line number Diff line change
Expand Up @@ -452,6 +452,10 @@ autocompletion is disabled when copy-pasted input is detected.

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

*Note*: This is automatically called by any readline instance on its `input`
if the `input` is a terminal. Closing the `readline` instance does not stop
the `input` from emitting `'keypress'` events.

```js
readline.emitKeypressEvents(process.stdin);
if (process.stdin.isTTY)
Expand Down

0 comments on commit 594e3c2

Please sign in to comment.