Necesito presionar solo 1 tecla, intenté usar iohook, pero no funcionó
var stdin = process.openStdin(); process.stdin.setRawMode(true); function d() { return new Promise((res, rej) => { stdin.on('keypress', function (chunk, key) { res(key); }); }) } d().then(d => { console.log(d); })