From 05f39eda154d7293a449291cabc2de2af71738b3 Mon Sep 17 00:00:00 2001 From: Samuel Reed Date: Thu, 3 Nov 2016 11:23:57 -0500 Subject: [PATCH] doc: readline.emitKeypressEvents note --- doc/api/readline.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/doc/api/readline.md b/doc/api/readline.md index 36c7e4502274bd..d82dd38f723d20 100644 --- a/doc/api/readline.md +++ b/doc/api/readline.md @@ -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. @@ -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)