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 https://www.espruino.com/modules/VT100.js which handles writing everything out to a Graphics instance, and potentially you could use that if you really needed to.
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
I'm not sure quite what you're doing with
inbuf
? If you just hadUSB.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 https://www.espruino.com/modules/VT100.js which handles writing everything out to a Graphics instance, and potentially you could use that if you really needed to.