handle method

bool handle({
  1. required PlutoKeyManagerEvent keyEvent,
  2. required PlutoGridStateManager stateManager,
  3. required HardwareKeyboard state,
})

If the shortcut registered in actions matches, the action for the shortcut is executed.

If there is no matching shortcut and returns false , the default shortcut behavior is processed.

Implementation

bool handle({
  required PlutoKeyManagerEvent keyEvent,
  required PlutoGridStateManager stateManager,
  required HardwareKeyboard state,
}) {
  for (final action in actions.entries) {
    if (action.key.accepts(keyEvent.event, state)) {
      action.value.execute(keyEvent: keyEvent, stateManager: stateManager);
      return true;
    }
  }

  return false;
}