Vixen
feb85697

KeyEquivalentEvent

class Core/Vixen.Ui/AccessKeys.cs:28
csharp
public sealed class KeyEquivalentEvent

An element's bare key equivalent was pressed and nothing on the route wanted it.

Read the guide page for this →

Remarks

The Return and Escape of a form, and the same shape as AccessKeyEvent with the modifier taken off. AppKit's keyEquivalent, WPF's IsDefault/IsCancel: a button that presses when Return reaches the form unclaimed, and one that presses on Escape. The document decides which element — within the focus scope, so a dialog's default cannot be pressed from the window behind it — and raises this on it; what the element does with it is its own business, exactly as an access key is.

⚠ Raised only for a press the route declined. A text field that takes Return for a newline, a list that takes Escape to clear its selection, an open overlay that closes on Escape: each sees the key first and keeps it, and the default button hears nothing. That is the CSS-shaped rule every other document fallback follows and the one that makes a default button safe to put beside a multi-line field.

Fields and properties (1)

  • public InputKey Key

    The key, as the element declared it.

Used by (3)

  • ButtonBaseVixen.Ui.Controls
  • KeyEquivalentTestsVixen.Ui.Tests
  • UiDocumentVixen.Ui