Skip to content

Commit

Permalink
fix backspace mobile ssh
Browse files Browse the repository at this point in the history
  • Loading branch information
si458 committed Oct 15, 2023
1 parent d095831 commit ad14c83
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion views/default-mobile.handlebars
Original file line number Diff line number Diff line change
Expand Up @@ -2968,7 +2968,15 @@
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
if (k == 8) { // Enter and backspace
if (terminal.urlname == 'sshterminalrelay.ashx') {
// SSH
terminal.socket.send('~' + String.fromCharCode(k));
} else {
// Agent
terminal.sendText(String.fromCharCode(k));
}
}
else if (e.ctrlKey && (k >= 64) && (k <= 95)) {
// Ctrl keys
if (terminal.urlname == 'sshterminalrelay.ashx') {
Expand Down

0 comments on commit ad14c83

Please sign in to comment.