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

166
Views
Proper line editing when using node.js for terminal app

I am making a command line interface to a Forth system running on an Arduino Nano using node.jsr. I am finding when trying to edit a line before accepting it with the enter key that I get unexpected results. When I press the left or right arrow keys I get ^[[D and ^[[C respectively rather than the cursor moving left or right. The following code provides an example:

process.stdin.on('data', (data) => {
    process.stdout.write(data)
});

If you run the above code, type a few characters then try to move back with the left arrow, ^[[D shows up rather than the cursor moving to the left. Does anyone know how to correct this behaviour?

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!