KeyAction constructor

KeyAction(
  1. LogicalKeyboardKey keyStroke,
  2. String description,
  3. VoidCallback callback, {
  4. String? categoryHeader,
  5. bool isControlPressed = false,
  6. bool isMetaPressed = false,
  7. bool isShiftPressed = false,
  8. 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);