Vixen
dd8b0a81
csharp
public sealed class KeyEvent

A key going down or coming up.

No guide page documents this yet — the page shows what the code says about itself.

Remarks

⚠ A key is a position, not a character. Key is the physical key by its US-QWERTY legend — the same HID usage Vixen.Input reports — so a control that wants Escape, Tab or the arrows reads this, and a control that wants the letter somebody typed reads TextInputEvent instead. On an AZERTY keyboard the key that types a is Q, and a text box that built its content out of key codes would be unusable in France.

Routed like anything else, from the focus outwards. That is what lets a dialog handle Escape without every control inside it knowing the dialog exists, and what makes a shortcut on a panel work while the focus is on a field inside it.

Fields and properties (5)

  • public InputKey Key

    Which physical key.

  • public KeyAction Action

    Whether it went down or came up.

  • public ModifierKeys Modifiers

    What was held at the time.

  • public bool IsRepeat

    Whether this is the platform's auto-repeat rather than a fresh press.

  • public TimeSpan Timestamp

    When it happened, on the same clock as Timestamp.

Methods (1)

  • public bool Has(ModifierKeys modifiers)

    Whether exactly these modifiers were held, and no others.

Used by (99, showing 40)

  • ShellHelloUi
  • AccessKeyTestsVixen.Ui.Tests
  • AdvancedFixtureVixen.Ui.Controls.Advanced.Tests
  • BuildContextVixen.Ui
  • ButtonBaseVixen.Ui.Controls
  • ClipboardTestsVixen.Ui.Controls.Tests
  • CodeEditorVixen.Ui.Controls.Advanced
  • ColorFieldVixen.Ui.Controls.Advanced
  • ColorInputVixen.Ui.Controls.Advanced
  • ColorStripVixen.Ui.Controls.Advanced
  • ColorSwatchVixen.Ui.Controls.Advanced
  • CommandDispatcherVixen.Ui.Controls
  • CompositionTestsVixen.Ui.Tests
  • ControlVixen.Ui.Controls
  • ControlFixtureVixen.Ui.Controls.Tests
  • ControllerVixen.Ui.Tests
  • CurveEditorVixen.Ui.Controls.Advanced
  • DataGridVixen.Ui.Controls.Advanced
  • DockPanelVixen.Ui.Controls.Advanced
  • EditingParityTestsVixen.Ui.Controls.Advanced.Tests
  • EmitterTestsVixen.Ui.Markup.Tests
  • GradientEditorVixen.Ui.Controls.Advanced
  • GradientRailVixen.Ui.Controls.Advanced
  • IResponderVixen.Ui
  • InAppDragTestsVixen.Ui.Tests
  • InteractionTestsVixen.Ui.Testing.Tests
  • KeyChordVixen.Ui
  • KeyChordTestsVixen.Ui.Tests
  • KeyWindowTestsVixen.Ui.Tests
  • KeyboardDragTestsVixen.Ui.Tests
  • KeyboardTestsVixen.Ui.Tests
  • KeyedVixen.Ui.Tests
  • MenuVixen.Ui.Controls
  • NavigationTestsVixen.Ui.Tests
  • NodeCanvasVixen.Ui.Controls.Advanced
  • NumericInputVixen.Ui.Controls
  • OverlayVixen.Ui.Controls
  • PlatformInputVixen.Platform.Ui
  • RadialMenuVixen.Ui.Controls
  • RadioGroupVixen.Ui.Controls