doc: add readline.emitKeypressEvents note · nodejs/node@594e3c2

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)