KeySet<T extends KeyboardKey> class
Null safety
A set of KeyboardKeys that can be used as the keys in a Map.
A key set contains the keys that are down simultaneously to represent a shortcut.
This is a thin wrapper around a Set, but changes the equality comparison from an identity comparison to a contents comparison so that non-identical sets with the same keys in them will compare as equal.
See also:
- ShortcutManager, which uses LogicalKeySet (a KeySet subclass) to define its key map.
- Implementers
- Annotations
Constructors
- KeySet(T key1, [T? key2, T? key3, T? key4])
- A constructor for making a KeySet of up to four keys.
-
KeySet.fromSet(Set<
T> keys) - Create a KeySet from a set of KeyboardKeys.
Properties
- hashCode → int
-
The hash code for this object.
latefinal
-
keys
→ Set<
T> -
Returns a copy of the KeyboardKeys in this KeySet.
read-only
- runtimeType → Type
-
A representation of the runtime type of the object.
read-onlyinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a non-existent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override