doc: add readline.emitKeypressEvents note
PR-URL: https://github.com/nodejs/node/pull/9447 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
This commit is contained in:
parent
b5d8d7c6f9
commit
ac3477971f
@ -457,6 +457,10 @@ autocompletion is disabled when copy-pasted input is detected.
|
|||||||
|
|
||||||
If the `stream` is a [TTY][], then it must be in raw mode.
|
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
|
```js
|
||||||
readline.emitKeypressEvents(process.stdin);
|
readline.emitKeypressEvents(process.stdin);
|
||||||
if (process.stdin.isTTY)
|
if (process.stdin.isTTY)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user