@@ -69,12 +69,18 @@ A `boolean` that is always `true` for `tty.ReadStream` instances.
6969
7070<!-- YAML
7171added: v0.7.7
72+ changes:
73+ - version: REPLACEME
74+ pr-url: https://github.com/nodejs/node/pull/REPLACEME
75+ description: The `mode` argument supports `'raw-vt'` and `'io'`.
7276-->
7377
74- * ` mode ` {boolean} If ` true ` , configures the ` tty.ReadStream ` to operate as a
75- raw device. If ` false ` , configures the ` tty.ReadStream ` to operate in its
76- default mode. The ` readStream.isRaw ` property will be set to the resulting
77- mode.
78+ * ` mode ` {boolean|string} If ` true ` or ` 'raw-vt' ` , configures the
79+ ` tty.ReadStream ` to operate as a raw device. If ` 'io' ` , configures the
80+ ` tty.ReadStream ` to operate in binary-safe I/O mode. If ` false ` , configures
81+ the ` tty.ReadStream ` to operate in its default mode. The ` readStream.isRaw `
82+ property will be set to whether the stream is in raw mode, and the
83+ ` readStream.rawMode ` property will be set to the resulting mode.
7884* Returns: {this} The read stream instance.
7985
8086Allows configuration of ` tty.ReadStream ` so that it operates as a raw device.
@@ -86,6 +92,22 @@ characters. <kbd>Ctrl</kbd>+<kbd>C</kbd> will no longer cause a `SIGINT` when
8692in this mode. This mode does not affect terminal output processing, such as
8793newline translation on Unix terminals.
8894
95+ When in binary-safe I/O mode, terminal output processing is also disabled.
96+ This corresponds to libuv's ` UV_TTY_MODE_IO ` mode and is not supported on
97+ Windows.
98+
99+ ### ` readStream.rawMode `
100+
101+ <!-- YAML
102+ added: REPLACEME
103+ -->
104+
105+ * {boolean|string}
106+
107+ The current raw mode for the ` tty.ReadStream ` . This is ` false ` when the stream
108+ is in its default mode, ` 'raw-vt' ` when raw input mode is enabled, and ` 'io' `
109+ when binary-safe I/O mode is enabled.
110+
89111## Class: ` tty.WriteStream `
90112
91113<!-- YAML
0 commit comments