doc: add some info on tty#setRawMode()#10147
Conversation
doc/api/tty.md
Outdated
There was a problem hiding this comment.
Can you wrap at 80 characters.
490707d to
6a63f9a
Compare
doc/api/tty.md
Outdated
There was a problem hiding this comment.
nit: I’d just call them “modifiers”, I don’t think they count as characters in any meaningful context
There was a problem hiding this comment.
You could probably just use a comma instead of parentheses.
doc/api/tty.md
Outdated
There was a problem hiding this comment.
Why For `stdin` ? This applies to all tty.ReadStreams equally
There was a problem hiding this comment.
Well stdout doesn't usually receive this kind of input? Honestly I'm not really sure what this does to stdout...
doc/api/tty.md
Outdated
There was a problem hiding this comment.
Maybe expand “echoing” to “echoing input characters” for clarity
doc/api/tty.md
Outdated
There was a problem hiding this comment.
I'm not sure the best way to improve it, but this sentence in parens looks off.
6a63f9a to
4238eb7
Compare
addaleax
left a comment
There was a problem hiding this comment.
I still wonder why stdin is being explicitly mentioned in the added text but other than that LGTM
4238eb7 to
b58aa76
Compare
|
@addaleax LGTY? |
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: nodejs#10037 PR-URL: nodejs#10147 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
b58aa76 to
a0a6ff2
Compare
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: #10037 PR-URL: #10147 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
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: #10037 PR-URL: #10147 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
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: #10037 PR-URL: #10147 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
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: #10037 PR-URL: #10147 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
Checklist
Affected core subsystem(s)
doc, tty
Description of change
Partially taken from https://linux.die.net/man/3/cfmakeraw
A very simple test script:
Related to #10037
Refs(?): http://docs.libuv.org/en/v1.x/tty.html#c.uv_tty_mode_t