Skip to content

Provide Console KeyPress Event #20444

Closed
Closed
@DartBot

Description

@DartBot

This issue was originally filed by @kaendfinger


I read an article (http://stackoverflow.com/questions/5006821/nodejs-how-to-read-keystrokes-from-stdin) about reading keystrokes in nodejs.

I would like to see a simple API for keypresses.

Example:

stdin.onKeyPress.listen((KeyPressEvent event) {
  if (event.ctrl && event.key == "b") {
    print("You Pressed CTRL+B");
  }
  // Some Way to Prevent the Key from being written to stdout.
});

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-core-librarySDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries.closed-staleClosed as the issue or PR is assumed stalelibrary-iotype-enhancementA request for a change that isn't a bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions