Table of Contents

Class KeyboardShortcut

Namespace
The.Web.Controls
Assembly
Instagile.Web.Client.dll

A modifier + key chord that activates a command.

public sealed record KeyboardShortcut : IEquatable<KeyboardShortcut>
Inheritance
KeyboardShortcut
Implements
Inherited Members

Constructors

KeyboardShortcut(char, ShortcutModifiers)

public KeyboardShortcut(char key, ShortcutModifiers modifiers)

Parameters

key char

A single-character KeyboardEvent.key value, lowercased. Require Shift with Shift rather than by naming an uppercase key.

modifiers ShortcutModifiers

Must include CmdOrCtrl, Ctrl or Alt.

KeyboardShortcut(string, ShortcutModifiers)

public KeyboardShortcut(string key, ShortcutModifiers modifiers)

Parameters

key string

A KeyboardEvent.key value, such as "s", "F5" or "ArrowLeft". A single character is treated as lowercase - use Shift rather than "S".

modifiers ShortcutModifiers

Must include CmdOrCtrl, Ctrl or Alt.

Properties

AriaKeyShortcuts

The shortcut as an aria-keyshortcuts token list.

public string AriaKeyShortcuts { get; }

Property Value

string

Key

The KeyboardEvent.key value that completes the chord.

public string Key { get; }

Property Value

string

Modifiers

The modifier keys held alongside Key.

public ShortcutModifiers Modifiers { get; }

Property Value

ShortcutModifiers

Save

Ctrl+S, or Cmd+S on macOS.

public static KeyboardShortcut Save { get; }

Property Value

KeyboardShortcut

Methods

ToString()

The shortcut as a display hint, e.g. "Ctrl+S".

public override string ToString()

Returns

string

Remarks

Not displayed anywhere yet. CmdOrCtrl currently reads as Ctrl on every platform.