Vixen
02b45cc4

KeyboardShortcut

ui control Core/Vixen.Ui.Controls/Display.cs:232
csharp
public sealed class KeyboardShortcut

A key combination, drawn the way a menu draws one.

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

Remarks

⚠ It shows a shortcut and does not listen for one. Binding a key is Vixen.Input's job, and a label that registered a hotkey as a side effect of being drawn would fire twice when a menu showed the same shortcut in two places.

Fields and properties (7)

  • protected override string TagName

    The element name this type answers to when a caller does not choose one.

  • protected override bool AcceptsFocus

    Whether the focus can rest on this kind of control at all.

  • public InputKey Key
  • public ModifierKeys Modifiers
  • public static Func<InputKey, ModifierKeys, string> Formatter

    How every shortcut in the process is written.

  • public static readonly UiPropertyKey KeyProperty

    Identity for Key.

  • public static readonly UiPropertyKey ModifiersProperty

    Identity for Modifiers.

Methods (3)

  • public static string Describe(InputKey key, ModifierKeys modifiers)

    Writes a combination the way a menu would.

  • public void ClearKey()

    Unsets Key, so it takes its default or its ancestor's value again.

  • public void ClearModifiers()

    Unsets Modifiers, so it takes its default or its ancestor's value again.

Used by (4)

  • MenuItemVixen.Ui.Controls
  • EditorShellTestsVixen.Editor.Ui.Tests
  • KeyChordVixen.Editor.Ui
  • MenuTestsVixen.Editor.Ui.Tests