KeyCode class

A set of keyIds representing a single abstract key.

When included as part of a Keybinding, this KeyCode is acknowledged as pressed when any one of the keyIds is pressed.

Constructors

KeyCode(Set<int> keyIds, {String? label})
A set of keyIds representing a single abstract key.
const
KeyCode.from(KeyboardKey key, {String? label})
Creates a KeyCode from a LogicalKeyboardKey.
factory
KeyCode.fromSet(Iterable<KeyboardKey> keys, {String? label})
Creates a KeyCode from a set of LogicalKeyboardKeys.
factory

Properties

hashCode int
The hash code for this object.
no setteroverride
keyIds Set<int>
The key ID(s) representing this KeyCode.
final
label String?
The optional label of the key(s) represented by this KeyCode.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

equals(KeyCode other) bool
Returns true if this and other have any of the same keyIds.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
The equality operator.
override

Constants

alt → const KeyCode
A KeyCode representing both alt keys.
ctrl → const KeyCode
A KeyCode representing both ctrl keys.
shift → const KeyCode
A KeyCode representing both shift keys.