Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

140
Views
Need to get 1 keypress using iohook and close stream

I need to get only 1 keypress, i tried using iohook, but it didn't work

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);
})
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!