Skip to content

Commit

Permalink
doc: readline.emitKeypressEvents note
Browse files Browse the repository at this point in the history
  • Loading branch information
STRML committed Nov 3, 2016
1 parent 3c1e5b3 commit 05f39ed
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion doc/api/readline.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ rl.question('What do you think of Node.js? ', (answer) => {
});
```

*Note* Once this code is invoked, the Node.js application will not
*Note*: Once this code is invoked, the Node.js application will not
terminate until the `readline.Interface` is closed because the interface
waits for data to be received on the `input` stream.

Expand Down Expand Up @@ -447,6 +447,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 05f39ed

Please sign in to comment.