Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremiah Senkpiel <fishrock123@rocketmail.com>2016-12-06 19:24:26 +0300
committerJeremiah Senkpiel <fishrock123@rocketmail.com>2016-12-08 21:39:45 +0300
commita0a6ff2ea5afc93c5d6b592ebecc17ff5b4ffa6a (patch)
treec771e2a739d3e2a7eb2d93372362bc153da00ca3 /doc/api/tty.md
parentdf3978421b86991fb45256f1a8694e0590019b13 (diff)
doc: add some info on `tty#setRawMode()`
Partially taken from https://linux.die.net/man/3/cfmakeraw A very simple test script: ``` if (process.argv[2] === 'raw') process.stdin.setRawMode(true) process.stdin.on('data', (chunk) => { console.log(chunk) console.log(chunk.toString()) }) ``` Refs: https://github.com/nodejs/node/pull/10037 PR-URL: https://github.com/nodejs/node/pull/10147 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
Diffstat (limited to 'doc/api/tty.md')
-rw-r--r--doc/api/tty.md7
1 files changed, 7 insertions, 0 deletions
diff --git a/doc/api/tty.md b/doc/api/tty.md
index f9be1fc4ffd..8f250e45d65 100644
--- a/doc/api/tty.md
+++ b/doc/api/tty.md
@@ -50,6 +50,13 @@ raw device. Defaults to `false`.
added: v0.7.7
-->
+Allows configuration of `tty.ReadStream` so that it operates as a raw device.
+
+When in raw mode, input is always available character-by-character, not
+including modifiers. Additionally, all special processing of characters by the
+terminal is disabled, including echoing input characters.
+Note that `CTRL`+`C` will no longer cause a `SIGINT` when in this mode.
+
* `mode` {boolean} If `true`, configures the `tty.ReadStream` to operate as a
raw device. If `false`, configures the `tty.ReadStream` to operate in its
default mode. The `readStream.isRaw` property will be set to the resulting