Skip to content

up/down keys on Windows have broken behavior in windows #5821

@martinheidegger

Description

@martinheidegger

At nodeschool we have had reports for a while that the workshoppers don't work on windows. Issues for reference: workshopper#420 nodeschool/discussions#1641.

After some research I found out that from Node 5.6 on it seems like some system code is overriding the cursor up/down behavior in the rawmode of tty.

Since it is a bit hard to explain I prepared a short video showing the behavior. Youtube Link

It uses the following script:

var stdin = process.stdin;

stdin.on('data', function (data) {
  data = data.toString()
  console.log(data.split("").map(function (chr) { return chr.charCodeAt(0) }))
  process.exit();
})
stdin.resume()
stdin.setRawMode(true)

Gist

  • Version: Node 5.6 +
  • Platform: Definitely tested on Windows 10
  • Subsystem: process.stdin

Metadata

Metadata

Assignees

No one assigned

    Labels

    ttyIssues and PRs related to the tty subsystem.windowsIssues and PRs related to the Windows platform.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions