InputAPI reference
Class KeyChord
Namespace: MicroEngine.Input
Assembly: MicroEngine.Input.dll
Guide: Input
A key pressed while a modifier is held: new KeyChord(Key.Enter, Key.LeftAlt, Key.RightAlt) is Alt+Enter with
either Alt key. The chord is down while Key and any one of Modifiers are down.
public sealed record KeyChord : IEquatable<KeyChord>Inheritance
Implements
Constructors
KeyChord(Key, params Key[])
A chord of key with any one of modifiers (at least one).
public KeyChord(Key key, params Key[] modifiers)Parameters
key Key
modifiers Key[]
Exceptions
No modifier is given.
Properties
Key
The key that is pressed.
public Key Key { get; }Property Value
Modifiers
The keys of which one must be held (both Alt keys, both Control keys…).
public IReadOnlyList<Key> Modifiers { get; }Property Value
Methods
<Clone>$()
public KeyChord <Clone>$()Returns
Equals(object?)
public override bool Equals(object? obj)Parameters
obj object?
Returns
Equals(KeyChord?)
public bool Equals(KeyChord? other)Parameters
other KeyChord?
Returns
GetHashCode()
public override int GetHashCode()Returns
ToString()
public override string ToString()Returns
Operators
operator ==(KeyChord?, KeyChord?)
public static bool operator ==(KeyChord? left, KeyChord? right)Parameters
left KeyChord?
right KeyChord?
Returns
operator !=(KeyChord?, KeyChord?)
public static bool operator !=(KeyChord? left, KeyChord? right)Parameters
left KeyChord?
right KeyChord?