Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var stdin = process.openStdin();
- require('tty').setRawMode(true);
- stdin.on('keypress', function (chunk, key) {
- process.stdout.write('Get Chunk: ' + chunk + '\n');
- if (key && key.ctrl && key.name == 'c') process.exit();
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement