In This Article

BarKeyboardShortcut Class

Represents a keyboard shortcut.

public class BarKeyboardShortcut
Inheritance:
Object Object

Constructors

BarKeyboardShortcut(String, Int32, Int32)

Initializes a new instance of the BarKeyboardShortcut class.

public BarKeyboardShortcut(string mode, int chordKey, int key)
Parameter Type Description
mode String

The mode in which the shortcut is valid. This value may be null if for the Global mode.

chordKey Int32

The Keys that starts a chord. This value may be null.

key Int32

The Keys specifying the main shortcut key.

BarKeyboardShortcut(String, Int32, Int32, Boolean)

Initializes a new instance of the BarKeyboardShortcut class.

public BarKeyboardShortcut(string mode, int chordKey, int key, bool enabled)
Parameter Type Description
mode String

The mode in which the shortcut is valid. This value may be null if for the Global mode.

chordKey Int32

The Keys that starts a chord. This value may be null.

key Int32

The Keys specifying the main shortcut key.

enabled Boolean

Whether the shortcut is enabled.

BarKeyboardShortcut(String, Keys, Keys)

Initializes a new instance of the BarKeyboardShortcut class.

public BarKeyboardShortcut(string mode, Keys chordKey, Keys key)
Parameter Type Description
mode String

The mode in which the shortcut is valid. This value may be null if for the Global mode.

chordKey Keys

The Keys that starts a chord. This value may be null.

key Keys

The Keys specifying the main shortcut key.

Properties

ChordKey

Gets the Keys that starts the chord.

public Keys ChordKey { get; }

Property Value

Keys:

The Keys that starts the chord.

Remarks

This value may be null.

Description

Gets the user-friendly description of the shortcut (keys and mode).

public string Description { get; }

Property Value

String:

The user-friendly description of the shortcut (keys and mode).

Enabled

Gets or sets whether the shortcut is enabled.

public bool Enabled { get; set; }

Property Value

Boolean:

true if the shortcut is enabled; otherwise, false.

Remarks

Disable shortcuts that should display but not really fire when pressed, such as for the Del key on an Edit.Delete command.

Key

Gets the Keys that is the main shortcut key.

public Keys Key { get; }

Property Value

Keys:

The Keys that is the main shortcut key.

Mode

Gets the mode in which the shortcut is valid.

public string Mode { get; }

Property Value

String:

The mode in which the shortcut is valid.

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 to the current Object.

Returns

Boolean:

true if the specified Object is equal to the current Object; otherwise, false.

GetHashCode()

Returns a hash code for this object.

public override int GetHashCode()

Returns

Int32:

An integer value that specifies a hash value for this object.

GetKeyString(Keys)

Gets the string version of a Keys.

public static string GetKeyString(Keys key)
Parameter Type Description
key Keys

The Keys to examine.

Returns

String:

The string version of a Keys.

ToString()

Converts the object to a String that has a user-friendly key name if a single key shortcut or a user-friendly chord key sequence if a chord shortcut.

public override string ToString()

Returns

String:

A string whose value represents this object.

Inherited Members