KeyAction.fromString constructor
KeyAction.fromString(})
Creates a key action from the first letter of any string string
with,
description and callback method. Includes optional bool values (defaulting
to false) for key modifiers for meta isMetaPressed
, shift isShiftPressed
,
alt isAltPressed
Implementation
KeyAction.fromString(String string, this.description, this.callback,
{this.categoryHeader, bool isControlPressed = false, bool isMetaPressed = false,
bool isShiftPressed = false, bool isAltPressed = false}) :
keyActivator = SingleActivator(LogicalKeyboardKey(string.toLowerCase().codeUnitAt(0)),
control: isControlPressed, shift: isShiftPressed, alt: isAltPressed, meta: isMetaPressed);