Skip to content

Commit 9dc5fc8

Browse files
edemainetrivikr
authored andcommitted
doc: document setRawMode write access on Windows
Fixes: #63852 Signed-off-by: Erik Demaine <edemaine@mit.edu>
1 parent c76aff4 commit 9dc5fc8

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

doc/api/tty.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,11 @@ characters. <kbd>Ctrl</kbd>+<kbd>C</kbd> will no longer cause a `SIGINT` when
8686
in this mode. This mode does not affect terminal output processing, such as
8787
newline translation on Unix terminals.
8888

89+
On Windows, `setRawMode()` requires write permission to the console input
90+
buffer. When opening `"\\\\.\\CONIN$"` with the [`fs.open()`][] family of APIs
91+
(for passing into `new tty.ReadStream()`), be sure to use a read/write flag
92+
such as `'r+'`.
93+
8994
## Class: `tty.WriteStream`
9095

9196
<!-- YAML
@@ -342,6 +347,7 @@ The `tty.isatty()` method returns `true` if the given `fd` is associated with
342347
a TTY and `false` if it is not, including whenever `fd` is not a non-negative
343348
integer.
344349

350+
[`fs.open()`]: fs.md#fsopenpath-flags-mode-callback
345351
[`net.Socket` constructor]: net.md#new-netsocketoptions
346352
[`process.stderr`]: process.md#processstderr
347353
[`process.stdin`]: process.md#processstdin

0 commit comments

Comments
 (0)