ClassChord
Represents a keyboard chord composed of key combinations and modifiers for input binding and shortcuts.
Definition
Namespace:Telerik.WinControls.Keyboard
Assembly:Telerik.WinControls.dll
Syntax:
[TypeConverter(typeof(ChordConverter))]
public class Chord : IComparable
Inheritance: objectChord
Implements:
Constructors
Chord(List<Keys>)
Initializes a new instance of the Chord class using a list of keys.
Declaration
public Chord(List<Keys> keys)
Parameters
keys
List<Keys>
The list of keys that compose this chord.
Chord(List<Keys>, ChordModifier)
Initializes a new instance of the Chord class using a list of keys and a chord modifier.
Declaration
public Chord(List<Keys> keys, ChordModifier chordModifier)
Parameters
keys
List<Keys>
The list of keys that compose this chord.
chordModifier
The modifier keys (Alt, Ctrl, Shift) for this chord.
Chord(string)
Initializes a new instance of the Chord class using a string representation of keys.
Declaration
public Chord(string keys)
Parameters
keys
The string representation of the keys that compose this chord.
Properties
ChordKeys
Gets the string representation of the non-modifier keys in this chord.
Declaration
public string ChordKeys { get; }
Property Value
A string describing the main keys (excluding modifiers) used in this chord.
ChordModifier
Gets or sets the chord modifier that defines which modifier keys are pressed.
Declaration
public ChordModifier ChordModifier { get; set; }
Property Value
A ChordModifier instance specifying Alt, Ctrl, and Shift key states.
Keys
Gets or sets the string representation of the keys in this chord.
Declaration
public string Keys { get; set; }
Property Value
A string describing the key combination for this chord.
KeysInternal
Gets or sets the internal list of keys that compose this chord.
Declaration
[Browsable(false)]
public List<Keys> KeysInternal { get; set; }
Property Value
List<Keys>
A list of keys used internally for chord management.
ModifierKeys
Gets the string representation of the modifier keys (Alt, Ctrl, Shift) in this chord.
Declaration
public string ModifierKeys { get; }
Property Value
A string describing the modifier keys used in this chord.
Methods
Clear()
Clears all keys and modifiers from this chord.
Declaration
public void Clear()
CompareTo(object)
Compares this chord with another chord for equality and ordering.
ProccessModifiers()
Processes the modifier keys (Alt, Ctrl, Shift) from the keys collection and moves them to the chord modifier.
Declaration
public void ProccessModifiers()
ReverseProccessModifiers()
Reverses the modifier processing by adding modifier keys back to the keys collection from the chord modifier.
Declaration
public void ReverseProccessModifiers()
ToString()
Returns the string representation of this chord.
Declaration
public override string ToString()
Returns
A string representing the key combination of this chord.
Overrides