Skip to content

Commit 88ac6ea

Browse files
committed
Terminal Input extended:
- TAB - ESC
1 parent fd404a7 commit 88ac6ea

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

SSHDebugger/Terminal/clsSSHTerminal.cs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -473,6 +473,13 @@ public void ShellSend(Gdk.Key key)
473473
case Gdk.Key.BackSpace:
474474
charBytes = new byte[] { (byte)'\b' };
475475
break;
476+
case Gdk.Key.KP_Tab:
477+
case Gdk.Key.Tab:
478+
charBytes = new byte[] { (byte)'\t' };
479+
break;
480+
case Gdk.Key.Escape:
481+
charBytes = new byte[] { 0x1B }; //ESC
482+
break;
476483
default:
477484
charBytes = Encoding.UTF8.GetBytes(new char[] { key.GetChar() });
478485
break;
@@ -527,7 +534,7 @@ public String RequestUserInput(String prompt, char? echoChar=null)
527534
break;
528535
default:
529536
{
530-
var keyValue = (char)Gdk.Keyval.ToUnicode((uint)LastKeyPress);
537+
var keyValue = LastKeyPress.GetChar();
531538
Write(echoChar.HasValue ? echoChar.Value.ToString() : keyValue.ToString());
532539
input += keyValue;
533540
}

0 commit comments

Comments
 (0)