GeezerVison is showing github.com — doc: document setRawMode write access on Windows · nodejs/node@abfc51f
File tree
Expand file treeCollapse file tree
Open diff view settings
Expand file treeCollapse file tree
Open diff view settings
Collapse file
Copy file name to clipboardExpand all lines: doc/api/tty.md +6Lines changed: 6 additions & 0 deletions - Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|
@@ -86,6 +86,11 @@ characters. <kbd>Ctrl</kbd>+<kbd>C</kbd> will no longer cause a `SIGINT` when |
86 | 86 | in this mode. This mode does not affect terminal output processing, such as |
87 | 87 | newline translation on Unix terminals. |
88 | 88 |
|
| 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 | + |
89 | 94 | ## Class: `tty.WriteStream` |
90 | 95 |
|
91 | 96 | <!-- YAML |
@@ -342,6 +347,7 @@ The `tty.isatty()` method returns `true` if the given `fd` is associated with |
342 | 347 | a TTY and `false` if it is not, including whenever `fd` is not a non-negative |
343 | 348 | integer. |
344 | 349 |
|
| 350 | +[`fs.open()`]: fs.md#fsopenpath-flags-mode-callback |
345 | 351 | [`net.Socket` constructor]: net.md#new-netsocketoptions |
346 | 352 | [`process.stderr`]: process.md#processstderr |
347 | 353 | [`process.stdin`]: process.md#processstdin |
|