Advertisement
Guest User

Untitled

a guest
Apr 18th, 2015
209
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.23 KB | None | 0 0
  1. var stdin = process.openStdin();
  2. require('tty').setRawMode(true);
  3.  
  4. stdin.on('keypress', function (chunk, key) {
  5. process.stdout.write('Get Chunk: ' + chunk + '\n');
  6. if (key && key.ctrl && key.name == 'c') process.exit();
  7. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement