Example #1
0
        private bool IsControlKeys(KeyEventArgs e)
        {
            switch (e.Key)
            {
            case Key.Up:
                terminalContentMgr.SetInput(historyCommand.SelectPrevious());
                break;

            case Key.Down:
                terminalContentMgr.SetInput(historyCommand.SelectNext());
                break;

            case Key.Home:
                terminalContentMgr.FocusEnd();
                break;

            case Key.Return:
                RunCmd();
                break;

            default:
                return(false);
            }

            return(true);
        }
Example #2
0
 public void HandleTab()
 {
     try
     {
         string completedLine = CompleteInput(terminal.GetInput(), TabIndex);
         terminal.SetInput(completedLine);
         TabIndex += 1;
     }
     catch (Exception)
     {
         ResetTabComplete();
     }
 }