Defines a keyboard combination that can be used to invoke a command.
Namespace: System.Windows.Input Assembly: PresentationCore (in presentationcore.dll) XML-Namespaces: http://schemas.microsoft.com/winfx/2006/xaml/presentation
Key Key A single key. For more information, see the Key property. oneOrMoreModifierKeys One or more modifier keys, defined by the ModifierKeys enumeration, delimited with a "+" character. For more information, see the Modifiers property.
In most cases, a KeyGesture must be associated with one or more ModifierKeys. The exceptions to this rule are the function keys and the numeric keypad keys, which can be a valid KeyGesture by themselves. For example, you can create a KeyGesture by using only the F12 key, but to use the X key in a KeyGesture it must be paired with a modifier key.
You can use a KeyBinding to bind a KeyGesture to an ICommand, so that the command is invoked when the KeyGesture occurs.