fix backspace mobile ssh
Simon Smith committed
Oct 15, 2023 at 23:42 UTC
ad14c834000413ac4fe049b90c022c54a127d560
1 file changed
+9
-1
views/default-mobile.handlebars
+9
-1
@@ -2968,7 +2968,15 @@
2968
gotKeyPressEvent = false;
2969
var k = 0;
2970
if (e.charCode != 0) { k = e.charCode; } else if (e.keyCode != 0) { k = e.keyCode; }
2971
- if (k == 8) { terminal.sendText(String.fromCharCode(k)); } // Enter and backspace
2971
+ if (k == 8) { // Enter and backspace
2972
+ if (terminal.urlname == 'sshterminalrelay.ashx') {
2973
+ // SSH
2974
+ terminal.socket.send('~' + String.fromCharCode(k));
2975
+ } else {
2976
+ // Agent
2977
+ terminal.sendText(String.fromCharCode(k));
2978
+ }
2979
+ }
2980
else if (e.ctrlKey && (k >= 64) && (k <= 95)) {
2981
// Ctrl keys
2982
if (terminal.urlname == 'sshterminalrelay.ashx') {