KeyAction class
A combination of a LogicalKeyboardKey (e.g., control-shift-A), a description of what action that keystroke should trigger (e.g., "select all text"), and a callback method to be invoked when that keystroke is pressed.
- Annotations
Constructors
- KeyAction(LogicalKeyboardKey keyStroke, String description, VoidCallback callback, {String? categoryHeader, bool isControlPressed = false, bool isMetaPressed = false, bool isShiftPressed = false, bool isAltPressed = false})
-
Creates a KeystrokeRep with the given LogicalKeyboardKey
keyStroke
,description
andcallback
method. Includes optional bool values (defaulting to false) for key modifiers for metaisMetaPressed
, shiftisShiftPressed
, altisAltPressed
- KeyAction.fromString(String string, String description, VoidCallback callback, {String? categoryHeader, bool isControlPressed = false, bool isMetaPressed = false, bool isShiftPressed = false, bool isAltPressed = false})
-
Creates a key action from the first letter of any string
string
with,description
andcallback
method. Includes optional bool values (defaulting to false) for key modifiers for metaisMetaPressed
, shiftisShiftPressed
, altisAltPressed
Properties
- callback → VoidCallback
-
final
- categoryHeader → String?
-
final
- description → String
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- isAltPressed → bool
-
no setter
- isControlPressed → bool
-
no setter
- isMetaPressed → bool
-
no setter
- isShiftPressed → bool
-
no setter
- keyActivator → SingleActivator
-
final
- label → String
-
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
matchesEvent(
RawKeyEvent event) → bool -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited