BarKeyboardShortcut Class
Represents a keyboard shortcut.
[TypeConverter(typeof(BarKeyboardShortcutConverter))]
public class BarKeyboardShortcut
- Inheritance:
- object object
Constructors
BarKeyboardShortcut(string?, int, int, bool)
Initializes an instance of the class.
public BarKeyboardShortcut(string? mode, int chordKey, int key, bool enabled = true)
| Parameter | Type | Description |
|---|---|---|
| mode | string | The mode in which the shortcut is valid. This value may be |
| chordKey | int | The Keys that starts a chord. This value may be |
| key | int | The Keys specifying the main shortcut key. |
| enabled | bool | Whether the shortcut is enabled. |
BarKeyboardShortcut(string?, Keys, Keys, bool)
Represents a keyboard shortcut.
public BarKeyboardShortcut(string? mode, Keys chordKey, Keys key, bool enabled = true)
| Parameter | Type | Description |
|---|---|---|
| mode | string | The mode in which the shortcut is valid. This value may be |
| chordKey | Keys | The Keys that starts a chord. This value may be |
| key | Keys | The Keys specifying the main shortcut key. |
| enabled | bool | Whether the shortcut is enabled. |
Properties
ChordKey
The Keys that starts the chord.
Description
The user-friendly description of the shortcut (keys and mode).
Enabled
Indicates whether the shortcut is enabled.
public bool Enabled { get; set; }
Property Value
- bool:
trueif the shortcut is enabled; otherwise,false.
Remarks
Disable shortcuts that should display but not execute when pressed, such as for the Del key on an Edit.Delete command.
Key
The Keys that is the main shortcut key.
Mode
The mode in which the shortcut is valid.
public string? Mode { get; }
Property Value
Remarks
This value may be null if for the Global mode.
Methods
Equals(object?)
Determines whether the specified object is equal to the current object.
public override bool Equals(object? obj)
| Parameter | Type | Description |
|---|---|---|
| obj | object | The object to compare with the current object. |
Returns
- bool:
trueif the specified object is equal to the current object; otherwise,false.
GetHashCode()
Serves as the default hash function.
GetKeyString(Keys)
Returns the string version of a Keys.
public static string GetKeyString(Keys key)
| Parameter | Type | Description |
|---|---|---|
| key | Keys | The Keys to examine. |
Returns
ToString()
Returns the string representation of this object.
Inherited Members
- object.GetType()
- object.MemberwiseClone()
- object.Equals(object, object)
- object.ReferenceEquals(object, object)