public override bool KeyDown(KeyEventArgs e) { if (!base.KeyDown(e)) { return(input.KeyDown(e)); } else { return(false); } }
public override bool KeyDown(KeyEventArgs e) { if (e.Code == Keyboard.Key.T && !Active) { Active = true; ignoreFirstText = true; return(true); } if (!Active) { return(false); } if (e.Code == Keyboard.Key.Up) { if (_inputIndex == -1 && _inputHistory.Any()) { _inputTemp = input.Text.ToString(); _inputIndex++; } else if (_inputIndex + 1 < _inputHistory.Count()) { _inputIndex++; } if (_inputIndex != -1) { input.Text = _inputHistory[_inputIndex]; } return(true); } if (e.Code == Keyboard.Key.Down) { if (_inputIndex == 0) { input.Text = _inputTemp; _inputTemp = ""; _inputIndex--; } else if (_inputIndex != -1) { _inputIndex--; input.Text = _inputHistory[_inputIndex]; } return(true); } return(input.KeyDown(e)); }
public override bool KeyDown(KeyboardInputEventArgs e) { if (!base.KeyDown(e)) return input.KeyDown(e); else return false; }