Windows.UI.Xaml.Input.KeyboardAccelerator

June 22, 2022 ยท View on GitHub

-description

Represents a keyboard shortcut (or accelerator) that lets a user perform an action using the keyboard instead of navigating the app UI (directly or through access keys).

Accelerators are typically assigned to buttons or menu items.

-remarks

An accelerator key can be a single key, such as F1 - F12 and Esc, or a combination of keys (Ctrl + Shift + B, or Ctrl C) that invoke a command. They differ from access keys (mnemonics), which are typically modified with the Alt key and simply activate a command or control.

An accelerator can be executed even if the element associated with the accelerator is not visible. For example, an item in the SecondaryCommands collection of the CommandBar can be invoked using an accelerator without expanding the overflow menu and displaying the element.

By default, an accelerator has global scope. However, you can constrain scope using ScopeOwner or disable an accelerator completely using IsEnabled.

-examples

-see-also

Keyboard Accelerators