call method

  1. @override
String? call(
  1. TerminalKeyboardEvent event
)
override

Implementation

@override
String? call(TerminalKeyboardEvent event) {
  if (event.type == TerminalKeyEventType.release) return null;
  if (event.state.modifyOtherKeysMode != 2) return null;
  // A character Option composed is text, not Alt plus a key: send it as
  // typed.
  if (isMacOptionComposedText(event)) return event.text;

  final codepoint = _codepoint(event);
  if (codepoint == null) return null;
  if (!_shouldModify(event, codepoint)) return null;

  return '\x1b[27;${_encodedModifiers(event)};$codepoint~';
}