onKeyEvent method

  1. @override
KeyEventResult onKeyEvent(
  1. RawKeyEvent event,
  2. Set<LogicalKeyboardKey> keysPressed
)

Implementation

@override
KeyEventResult onKeyEvent(
  RawKeyEvent event,
  Set<LogicalKeyboardKey> keysPressed,
) {
  if (!enabledKeyboard) {
    return KeyEventResult.ignored;
  }
  for (final c in _keyboardComponents) {
    if (c.onKeyboard(event, keysPressed)) {
      return super.onKeyEvent(event, keysPressed);
    }
  }
  return super.onKeyEvent(event, keysPressed);
}