API Reference
KeyChord
A key combination used by key bindings: either a key with exact modifiers (Ctrl+K, Shift+Tab, F1, PageDown) or a typed character (?, :, /) that matches however it was typed.
Inheritance
- ValueType
- KeyChord
Usage
Explore 9 API references to this type
This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.
Returned or exposed by 2
- Method KeyChord.Parse
- Property KeyBinding.Chords
Accepted by parameters 7
- Method KeyChord.Equals
- Method KeyChord.op_Equality
- Method KeyChord.op_Equality
- Method KeyChord.op_Inequality
- Method KeyChord.op_Inequality
- Method KeyChord.TryParse
- Constructor KeyBinding.KeyBinding
Constructors
Methods
public Boolean Equals(KeyChord other) #BooleanIndicates whether the current object is equal to another object of the same type.
Parameters
- other ConsoleMonster.Input.KeyChord
- An object to compare with this object.
Returns
true if the current object is equal to the other parameter; otherwise, false.
public override Boolean Equals(Object? obj) #BooleanIndicates whether this instance and a specified object are equal.
Parameters
- obj System.Object?
- The object to compare with the current instance.
Returns
true if obj and this instance are the same type and represent the same value; otherwise, false.
public override Int32 GetHashCode() #Int32Returns the hash code for this instance.
Returns
A 32-bit signed integer that is the hash code for this instance.
public Boolean Matches(InputEvent input) #BooleanWhether an event is this chord.
Parameters
- input ConsoleMonster.Input.InputEvent
- The event.
Returns
True on a match.
public static Boolean op_Equality(KeyChord left, KeyChord right) #BooleanEquality.
Parameters
- left ConsoleMonster.Input.KeyChord
- The left chord.
- right ConsoleMonster.Input.KeyChord
- The right chord.
Returns
True when equal.
public static Boolean op_Inequality(KeyChord left, KeyChord right) #BooleanInequality.
Parameters
- left ConsoleMonster.Input.KeyChord
- The left chord.
- right ConsoleMonster.Input.KeyChord
- The right chord.
Returns
True when different.
public static KeyChord Parse(String text) #KeyChordParses Ctrl+K, Alt+Enter, Shift+Tab, F5, PgDn, Space or a single character such as ?. Modifier and key names are case-insensitive.
Parameters
- text System.String
- The text.
Returns
The chord.
public override String ToString() #StringThe chord as people write it: Ctrl+K, Shift+Tab, ?.
Returns
The name.
public static Boolean TryParse(String? text, out KeyChord chord) #BooleanParses a chord; see KeyChord.Parse.
Parameters
- text System.String?
- The text.
- chord ConsoleMonster.Input.KeyChord
- The chord.
Returns
Whether the text is a chord.