KeyAction constructor
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 and callback method. Includes optional bool values (defaulting
to false) for key modifiers for meta isMetaPressed
, shift isShiftPressed
,
alt isAltPressed
Implementation
KeyAction(LogicalKeyboardKey keyStroke, this.description, this.callback,
{ this.categoryHeader,
bool isControlPressed = false,
bool isMetaPressed = false,
bool isShiftPressed = false,
bool isAltPressed = false})
: keyActivator = SingleActivator(keyStroke,
control: isControlPressed,
shift: isShiftPressed,
alt: isAltPressed,
meta: isMetaPressed);