Skip to content

Commit 8f0d900

Browse files
fanoushthegecko
authored andcommitted
allow empty lines too
it is typical to just press enter to see if console input is working
1 parent 5790cef commit 8f0d900

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

examples/rtt/web.html

+3-2
Original file line numberDiff line numberDiff line change
@@ -120,12 +120,13 @@
120120
const printable = !ev.altKey && !ev.ctrlKey && !ev.metaKey;
121121

122122
if (ev.keyCode === 13) { // process newline
123-
if (line_input.length) {
123+
// allow empty lines too
124+
// if (line_input.length) {
124125
term.write('\r\n');
125126
cmd = line_input;
126127
console.log('sending: \"' + line_input + '\"');
127128
line_input = "";
128-
}
129+
//}
129130
} else if (ev.keyCode === 8) { // process backspace
130131
if (term._core.buffer.x > 0) {
131132
term.write('\b \b');

0 commit comments

Comments
 (0)