Skip to content

Commit

Permalink
fix paste into serial console
Browse files Browse the repository at this point in the history
  • Loading branch information
copy committed May 23, 2021
1 parent ffe80ed commit da44702
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/browser/serial.js
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,10 @@ function SerialAdapterXtermJS(element, bus)
term.write("This is the serial console. Whatever you type or paste here will be sent to COM1");

term["onData"](function(data) {
bus.send("serial0-input", data.charCodeAt(0));
for(let i = 0; i < data.length; i++)
{
bus.send("serial0-input", data.charCodeAt(i));
}
});

bus.register("serial0-output-char", function(chr)
Expand Down

0 comments on commit da44702

Please sign in to comment.