Skip to content

Conversation

@arve0
Copy link
Contributor

@arve0arve0 commented May 7, 2016

Checklist
  • documentation is changed or added
  • the commit message follows commit guidelines
Affected core subsystem(s)

doc

Description of change

readline.emitKeypressEvents needs stream to be in raw mode, fixes#6626

@nodejs-github-botnodejs-github-bot added the doc Issues and PRs related to the documentations. label May 7, 2016
@addaleaxaddaleax added the readline Issues and PRs related to the built-in readline module. label May 7, 2016
@arve0arve0 changed the title expand documentation for readline.emitKeypressEventsdoc: readline.emitKeypressEvents and raw modeMay 7, 2016
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

needs

Copy link
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks.

@jasnell
Copy link
Member

@nodejs/documentation

@arve0
Copy link
ContributorAuthor

arve0 commented May 8, 2016

Might wanna add a check that the stream is a TTY in the example?

if(process.stdin.isTTY){// might not be a TTY if spawned from another node processprocess.stdin.setRawMode(true)}

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

“… the stream, if it is a TTY, needs to be…”?

@addaleax
Copy link
Member

@arve0 +1 to adding that check to the example. LGTM apart from that.

`readline.emitKeypressEvents` needs `stream` to be in raw mode, ref nodejs#6626
@arve0
Copy link
ContributorAuthor

Updated.

@r-52
Copy link
Contributor

r-52 commented May 12, 2016

LGTM

addaleax pushed a commit that referenced this pull request May 16, 2016
`readline.emitKeypressEvents` needs `stream` to be in raw mode. PR-URL: #6628Fixes: #6626 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Roman Klauke <[email protected]>
@addaleax
Copy link
Member

Landed in 1ba5a56. Thank you!

evanlucas pushed a commit that referenced this pull request May 17, 2016
`readline.emitKeypressEvents` needs `stream` to be in raw mode. PR-URL: #6628Fixes: #6626 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Roman Klauke <[email protected]>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docIssues and PRs related to the documentations.readlineIssues and PRs related to the built-in readline module.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Document that readline.emitKeypressEvents only works when tty is in raw mode

7 participants

@arve0@jasnell@addaleax@r-52@Fishrock123@MylesBorins@nodejs-github-bot