Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

168
Vistas
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
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda