Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const readline = require('readline');
- readline.emitKeypressEvents(process.stdin);
- if (process.stdin.isTTY) process.stdin.setRawMode(true);
- // listen to keypress
- process.stdin.on("keypress", (str, key) => {
- if(key.ctrl && key.name == "s") console.log("save")
- })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement