-
Notifications
You must be signed in to change notification settings - Fork 3
KeyboardShortcuts.KeyboardShortcut
Back to home | Back to Reference | View raw text
Represents a single keyboard shortcut entry.
flowchart LR
classDef interfaceStyle stroke-dasharray: 5 5;
classDef abstractStyle stroke-width:4px
subgraph SolidShineUi.KeyboardShortcuts
SolidShineUi.KeyboardShortcuts.KeyboardShortcut[[KeyboardShortcut]]
end
Type | Name | Methods |
---|---|---|
IKeyAction |
Action The action associated with this keyboard shortcut. When this shortcut is activated, this is the action that will occur. |
get |
KeyboardCombination |
Combination The control key combination needed before activating this shortcut. This shortcut will not activate unless these keys are also held down. |
get |
Key |
Key The specific key that, when pressed, triggers the shortcut. |
get |
string |
KeyString The string to display to the user, so they know which keys to press to activate the shortcut. |
get |
string |
MethodId Get or set the ID associated with the action of the keyboard shortcut, which is used for mapping shortcuts to actions (for example while loading or saving files). This should match the ID in the Action property. |
get, set |
UIElement |
SourceElement Get or set the element associated with this keyboard shortcut and action (such as a menu item if the action is associated with the command of a menu item). Having an element is not required. |
get, set |
Represents a single keyboard shortcut entry.
public KeyboardShortcut(KeyboardCombination combination, Key key, IKeyAction action)
Type | Name | Description |
---|---|---|
KeyboardCombination |
combination | The key combination needed, if any, for activating this shortcut. |
Key |
key | The specific key that corresponds to this shortcut. |
IKeyAction |
action | The action to perform when this shortcut is activated. |
Create a keyboard shortcut entry.
public KeyboardCombination Combination { get; }
The control key combination needed before activating this shortcut. This shortcut will not activate unless these keys are also held down.
public Key Key { get; }
The specific key that, when pressed, triggers the shortcut.
public string KeyString { get; }
The string to display to the user, so they know which keys to press to activate the shortcut.
public IKeyAction Action { get; }
The action associated with this keyboard shortcut. When this shortcut is activated, this is the action that will occur.
public string MethodId { get; set; }
Get or set the ID associated with the action of the keyboard shortcut, which is used for mapping shortcuts to actions (for example while loading or saving files). This should match the ID in the Action property.
public UIElement SourceElement { get; set; }
Get or set the element associated with this keyboard shortcut and action (such as a menu item if the action is associated with the command of a menu item). Having an element is not required.
Generated with ModularDoc