tty-signals

0.0.0-1 • Public • Published

tty-signals

Listen for keypress events from a readable stream!

Example:

var signals = require("tty-signals")(process.stdin);

process.stdin.resume();

require("tty").setRawMode(true);

signals.on("leftArrow", function() {
  console.log("<");
});

Events (so far):

  • "leftArrow"
  • "rightArrow"
  • "upArrow"
  • "downArrow"
  • "^C"
  • "^D"

License:

MIT/X11

Readme

Keywords

none

Package Sidebar

Install

npm i tty-signals

Weekly Downloads

0

Version

0.0.0-1

License

none

Last publish

Collaborators

  • jfhbrook