From 775457e2b974b4133be496e17bfa49e2a0446771 Mon Sep 17 00:00:00 2001 From: Ylian Saint-Hilaire Date: Sun, 11 Apr 2021 20:03:50 -0700 Subject: [PATCH] Fix for #2478 --- views/default-mobile.handlebars | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/views/default-mobile.handlebars b/views/default-mobile.handlebars index 4f809e2b..3a5f39ff 100644 --- a/views/default-mobile.handlebars +++ b/views/default-mobile.handlebars @@ -2803,6 +2803,10 @@ if (e.altKey == true) { return true; } Q('softKeyboard').value = ''; gotKeyPressEvent = false; + var k = 0; + if (e.charCode != 0) { k = e.charCode; } else if (e.keyCode != 0) { k = e.keyCode; } + if (k == 8) { terminal.sendText(String.fromCharCode(k)); } // Enter and backspace + else if (e.ctrlKey && (k >= 64) && (k <= 95)) { console.log(k - 64); terminal.sendText(String.fromCharCode(k - 64)); } // Ctrl keys } } @@ -2830,11 +2834,8 @@ } if (terminal && !xxdialogMode && (xxcurrentView == 10) && (currentDevicePanel == 5) && (gotKeyPressEvent == false) && (t !== 1)) { if (e.altKey == true) { return true; } + terminal.sendText(Q('softKeyboard').value); Q('softKeyboard').value = ''; - var k = 0; - if (e.charCode != 0) { k = e.charCode; } else if (e.keyCode != 0) { k = e.keyCode; } - if ((k == 8) || (k == 13)) { terminal.sendText(String.fromCharCode(k)); } // Enter and backspace - else if (e.ctrlKey && (k >= 64) && (k <= 95)) { console.log(k - 64); terminal.sendText(String.fromCharCode(k - 64)); } // Ctrl keys return false; } }