Keybinding class
A set of KeyCodes used to bind callbacks to a combination of zero or more keys on a keyboard. See: Keybinder
Constructors
-
Keybinding(Iterable<
KeyCode> keyCodes, {bool inclusive = false, String? debugLabel}) -
A set of KeyCodes used to bind callbacks to a combination
of zero or more keys on a keyboard. See: Keybinder
const
- Keybinding.empty()
-
Creates a Keybinding mapped to no keys.
factory
-
Keybinding.from(Iterable<
LogicalKeyboardKey> keys, {bool inclusive = false}) -
Creates a new Keybinding from LogicalKeyboardKeys.
factory
Properties
- debugLabel → String?
-
An optional label for debugging purposes; used by the toString method.
final
- hashCode → int
-
The hash code for this object.
no setteroverride
- inclusive → bool
-
If
true, this keybinding will be activated when all of its keys are pressed, even if other keys have been pressed in addition.final - isEmpty → bool
-
Returns
trueif this keybinding is mapped to no keys.no setter - isNotEmpty → bool
-
Returns
trueif this keybinding has any keys mapped to it.no setter - isPressed → bool
-
Returns
trueif the keys currently pressed match this keybinding.no setter -
keyCodes
→ Iterable<
KeyCode> -
The KeyCodes that make up the keybinding.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
contains(
KeyCode keyCode) → bool -
Returns
trueif this keybinding includeskeyCode. -
equals(
Keybinding? other) → bool -
Returns
trueifthisandotherhave equivalent KeyCodes. -
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) → Keybinding -
Returns a new Keybinding by merging
thiswith the KeyCodes provided byother. -
operator ==(
Object other) → bool -
The equality operator.
override
Constants
- alt → const Keybinding
-
A keybinding that registers as either
altkey. - ctrl → const Keybinding
-
A keybinding that registers as either
ctrlkey. - ctrlAlt → const Keybinding
-
A keybinding that registers as a combination of
the
ctrlandaltkeys. - ctrlAltShift → const Keybinding
-
A keybinding that registers as a combination of
the
ctrl,alt, andshiftkeys. - ctrlShift → const Keybinding
-
A keybinding that registers as a combination of
the
crtlandshiftkeys. - shift → const Keybinding
-
A keybinding that registers as either
shiftkey. - shiftAlt → const Keybinding
-
A keybinding that registers as a combination of
the
altandshiftkeys.