public void HandleKeyDown(InputEventsFilterArgs args, KeyEventArgs e) { switch (e.KeyCode) { case Keys.Enter: if (args.InputPosition >= 0) { _handleResultAction(KeyInputFilterResult.Input_Submit); } e.SuppressKeyPress = true; break; case Keys.Up: if (args.InputPosition < 0) { _handleResultAction(KeyInputFilterResult.Input_Focus); } _handleResultAction(KeyInputFilterResult.Input_ShowPreviousHistory); e.SuppressKeyPress = true; break; case Keys.Down: if (args.InputPosition < 0) { _handleResultAction(KeyInputFilterResult.Input_Focus); } _handleResultAction(KeyInputFilterResult.Input_ShowNextHistory); e.SuppressKeyPress = true; break; } }
public void HandleKeyDown(InputEventsFilterArgs args, KeyEventArgs e) { switch (e.KeyCode) { case Keys.Enter: _handleResultAction(KeyInputFilterResult.AutoComplete_Submit); e.SuppressKeyPress = true; break; case Keys.Up: _handleResultAction(KeyInputFilterResult.Input_Focus); _handleResultAction(KeyInputFilterResult.AutoComplete_SelectPrevious); e.SuppressKeyPress = true; break; case Keys.Down: _handleResultAction(KeyInputFilterResult.Input_Focus); _handleResultAction(KeyInputFilterResult.AutoComplete_SelectNext); e.SuppressKeyPress = true; break; case Keys.Cancel: Console.Write("cancel"); break; } }
public void HandleKeyUp(InputEventsFilterArgs args, KeyEventArgs e) { switch (e.KeyData) { case Keys.Tab: _handleResultAction(KeyInputFilterResult.AutoComplete_Start); e.SuppressKeyPress = true; break; } }
public void HandleKeyPress(InputEventsFilterArgs args, KeyPressEventArgs e) { switch ((int)e.KeyChar) { case 32: // space _handleResultAction(KeyInputFilterResult.AutoComplete_Submit); e.Handled = true; break; case 27: // escape _handleResultAction(KeyInputFilterResult.AutoComplete_Cancel); e.Handled = true; break; } }
public void HandleKeyDown(InputEventsFilterArgs args, System.Windows.Forms.KeyEventArgs e) { switch (e.KeyCode) { case Keys.C: if (e.Modifiers == Keys.Control) { _handleResultAction(KeyInputFilterResult.Exec_CancelCommandExecution); } e.SuppressKeyPress = true; break; } e.SuppressKeyPress = true; }
public void HandleKeyPress(InputEventsFilterArgs args, KeyPressEventArgs e) { if (args.InputPosition < 0) { e.Handled = true; return; } if (!char.IsLetterOrDigit(e.KeyChar) && !char.IsSeparator(e.KeyChar) && !char.IsPunctuation(e.KeyChar) && !char.IsSymbol(e.KeyChar) && (int)e.KeyChar != 27) // escape { // ignore all of this e.Handled = true; } }
private void HandleKeyPress(InputEventsFilterArgs args, KeyPressEventArgs e) { EventArgs = new InputEvents() { KeyPressData = e }; foreach (var filter in _filters.Values) { if (filter.IsEngaged) { filter.HandleKeyPress(args, e); if (e.Handled) { break; } } } }
public void HandleKeyDown(InputEventsFilterArgs args, KeyEventArgs e) { switch (e.KeyCode) { case Keys.Delete: if (args.InputPosition < 0) { e.SuppressKeyPress = true; } break; case Keys.Back: if (args.InputPosition <= 0) { e.SuppressKeyPress = true; } break; case Keys.Left: if (args.InputPosition == 0) { e.SuppressKeyPress = true; } break; case Keys.Home: if (args.InputPosition > 0) { if (e.Modifiers == Keys.Shift) { _handleResultAction(KeyInputFilterResult.Input_SelectToStart); } else { _handleResultAction(KeyInputFilterResult.Input_MoveToStart); } } e.SuppressKeyPress = true; break; } }
public void HandleKeyDown(InputEventsFilterArgs args, KeyEventArgs e) { switch (e.KeyCode) { case Keys.Enter: if (args.InputPosition >= 0) { _handleResultAction(KeyInputFilterResult.Input_CommandExecutionSubmit); } e.SuppressKeyPress = true; break; case Keys.Up: e.SuppressKeyPress = true; break; case Keys.Down: e.SuppressKeyPress = true; break; } }
public void HandleKeyUp(InputEventsFilterArgs args, KeyEventArgs e) { }
public void HandleKeyPress(InputEventsFilterArgs args, System.Windows.Forms.KeyPressEventArgs e) { }
public void HandleKeyPress(InputEventsFilterArgs args, KeyPressEventArgs e) { }
public void HandleKeyUp(InputEventsFilterArgs args, System.Windows.Forms.KeyEventArgs e) { e.SuppressKeyPress = true; }