Class Hotkey
Some code to help with hotkeys
Inheritance
System.Object
Hotkey
Namespace: Dapplo.Windows.Input
Assembly: Dapplo.Windows.Input.dll
Syntax
public static class Hotkey : object
Methods
| Improve this Doc View SourceGetKeyName(Keys)
Get the name of a key
Declaration
public static string GetKeyName(Keys givenKey)
Parameters
Type | Name | Description |
---|---|---|
Keys | givenKey |
Returns
Type | Description |
---|---|
System.String |
GetLocalizedHotkeyStringFromString(String)
Create a localized string from a normal hotkey string
Declaration
public static string GetLocalizedHotkeyStringFromString(string hotkeyString)
Parameters
Type | Name | Description |
---|---|---|
System.String | hotkeyString | string |
Returns
Type | Description |
---|---|
System.String | string |
HotkeyFromString(String)
Get a Key object from a hotkey description
Declaration
public static Keys HotkeyFromString(string hotkey)
Parameters
Type | Name | Description |
---|---|---|
System.String | hotkey | string with the hotkey |
Returns
Type | Description |
---|---|
Keys | Keys |
HotkeyModifiersFromString(String)
Get the modifiers as a Keys enum
Declaration
public static Keys HotkeyModifiersFromString(string modifiersString)
Parameters
Type | Name | Description |
---|---|---|
System.String | modifiersString |
Returns
Type | Description |
---|---|
Keys | Keys |
HotkeyModifiersToLocalizedString(Keys)
Create a localized string from the specified modifiers keys
Declaration
public static string HotkeyModifiersToLocalizedString(Keys modifierKeyCode)
Parameters
Type | Name | Description |
---|---|---|
Keys | modifierKeyCode | Keys |
Returns
Type | Description |
---|---|
System.String | string |
HotkeyModifiersToString(Keys)
Create a string of the specified modifiers
Declaration
public static string HotkeyModifiersToString(Keys modifierKeyCode)
Parameters
Type | Name | Description |
---|---|---|
Keys | modifierKeyCode | Keys |
Returns
Type | Description |
---|---|
System.String | string |
HotkeyToLocalizedString(Keys, Keys)
Create a localized string from the specified keys
Declaration
public static string HotkeyToLocalizedString(Keys modifierKeyCode, Keys virtualKeyCode)
Parameters
Type | Name | Description |
---|---|---|
Keys | modifierKeyCode | Keys |
Keys | virtualKeyCode | Keys |
Returns
Type | Description |
---|---|
System.String | string |
HotkeyToString(Keys, Keys)
Create a string for the specified modifiers and key
Declaration
public static string HotkeyToString(Keys modifierKeyCode, Keys virtualKeyCode)
Parameters
Type | Name | Description |
---|---|---|
Keys | modifierKeyCode | Keys |
Keys | virtualKeyCode | Keys |
Returns
Type | Description |
---|---|
System.String | string |