Skip to content

doc: clarify tty raw mode applies to input processing only#63438

Open
zeeshan56656 wants to merge 1 commit into
nodejs:mainfrom
zeeshan56656:fix/63059-tty-rawmode-doc
Open

doc: clarify tty raw mode applies to input processing only#63438
zeeshan56656 wants to merge 1 commit into
nodejs:mainfrom
zeeshan56656:fix/63059-tty-rawmode-doc

Conversation

@zeeshan56656
Copy link
Copy Markdown

The tty.ReadStream.setRawMode() documentation currently states that "all special processing of characters by the terminal is disabled", which is misleading. On Unix, raw mode (cfmakeraw/ICANON+ISIG+IEXTEN cleared) only affects input character processing. Output processing flags such as OPOST and ONLCR, which perform the \n to \r\n translation on terminal output, are untouched by setRawMode(true).

This change scopes the existing sentence to input characters and adds a brief note clarifying that terminal output processing, including newline translation on Unix terminals, is not affected. No runtime behavior changes.

Fixes: #63059

Checklist

  • make -j4 test (UNIX), or vcbuild test (Windows) passes (documentation only change)
  • tests and/or benchmarks are included (test-exempt: this PR corrects documentation text only with no behavioral changes)
  • documentation is changed or added
  • commit message follows commit guidelines

Update the setRawMode documentation to specify that raw mode disables
special processing of input characters only. Output processing, such as
newline translation on Unix terminals, is not affected.

Fixes: nodejs#63059
@nodejs-github-bot nodejs-github-bot added doc Issues and PRs related to the documentations. tty Issues and PRs related to the tty subsystem. labels May 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

doc Issues and PRs related to the documentations. tty Issues and PRs related to the tty subsystem.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

tty.ReadStream.setRawMode(true) on Unix does not disable tty output \n -> \r\n translation

2 participants