You are reading a single comment by @Nicktonious and its replies. Click here to read the full conversation.
  • I'm not sure quite what you're doing with inbuf? If you just had USB.on('data', data => LoopbackB.write(data)) I'd have thought up-arrow and stuff like that would work fine.

    Ctrl-C doesn't work because JS is effectively single-threaded. Data is only transferred between USB/Loopback when your JS is run which transfers it - but if you are running other code then the JS that does that doesn't run. To work around it normally there's some special code in the interpreter which looks for Ctrl-C as it comes in, in the interrupt.

    If you want to figure out how to properly interpret the data you're getting, google VT100 - that's effectively what you have. Espruino does have a very simplistic implementation in­s which handles writing everything out to a Graphics instance, and potentially you could use that if you really needed to.


Avatar for Nicktonious @Nicktonious started