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
true
if this keybinding is mapped to no keys.no setter - isNotEmpty → bool
-
Returns
true
if this keybinding has any keys mapped to it.no setter - isPressed → bool
-
Returns
true
if the keys currently pressed match this keybinding.no setter -
keyCodes
→ Iterable<
KeyCode> -
The
KeyCode
s 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
true
if this keybinding includeskeyCode
. -
equals(
Keybinding? other) → bool -
Returns
true
ifthis
andother
have 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
this
with the KeyCodes provided byother
. -
operator ==(
Object other) → bool -
The equality operator.
override
Constants
- alt → const Keybinding
-
A keybinding that registers as either
alt
key. - ctrl → const Keybinding
-
A keybinding that registers as either
ctrl
key. - ctrlAlt → const Keybinding
-
A keybinding that registers as a combination of
the
ctrl
andalt
keys. - ctrlAltShift → const Keybinding
-
A keybinding that registers as a combination of
the
ctrl
,alt
, andshift
keys. - ctrlShift → const Keybinding
-
A keybinding that registers as a combination of
the
crtl
andshift
keys. - shift → const Keybinding
-
A keybinding that registers as either
shift
key. - shiftAlt → const Keybinding
-
A keybinding that registers as a combination of
the
alt
andshift
keys.