Fix for #2478
Ylian Saint-Hilaire committed
Apr 11, 2021 at 20:03 UTC
775457e2b974b4133be496e17bfa49e2a0446771
1 file changed
+5
-4
views/default-mobile.handlebars
+5
-4
@@ -2803,6 +2803,10 @@
2803
if (e.altKey == true) { return true; }
2804
Q('softKeyboard').value = '';
2805
gotKeyPressEvent = false;
2806
+ var k = 0;
2807
+ if (e.charCode != 0) { k = e.charCode; } else if (e.keyCode != 0) { k = e.keyCode; }
2808
+ if (k == 8) { terminal.sendText(String.fromCharCode(k)); } // Enter and backspace
2809
+ else if (e.ctrlKey && (k >= 64) && (k <= 95)) { console.log(k - 64); terminal.sendText(String.fromCharCode(k - 64)); } // Ctrl keys
2810
}
2811
}
2812
@@ -2830,11 +2834,8 @@
2834
}
2835
if (terminal && !xxdialogMode && (xxcurrentView == 10) && (currentDevicePanel == 5) && (gotKeyPressEvent == false) && (t !== 1)) {
2836
if (e.altKey == true) { return true; }
2837
+ terminal.sendText(Q('softKeyboard').value);
2838
Q('softKeyboard').value = '';
2834
- var k = 0;
2835
- if (e.charCode != 0) { k = e.charCode; } else if (e.keyCode != 0) { k = e.keyCode; }
2836
- if ((k == 8) || (k == 13)) { terminal.sendText(String.fromCharCode(k)); } // Enter and backspace
2837
- else if (e.ctrlKey && (k >= 64) && (k <= 95)) { console.log(k - 64); terminal.sendText(String.fromCharCode(k - 64)); } // Ctrl keys
2839
return false;
2840
}
2841
}