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 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 true if this keybinding includes keyCode.
equals(Keybinding? other) bool
Returns true if this and other 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 by other.
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 and alt keys.
ctrlAltShift → const Keybinding
A keybinding that registers as a combination of the ctrl, alt, and shift keys.
ctrlShift → const Keybinding
A keybinding that registers as a combination of the crtl and shift 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 and shift keys.