keyInput method

bool keyInput(
  1. TerminalLibraryFlutterKey key, {
  2. bool shift = false,
  3. bool alt = false,
  4. bool ctrl = false,
})

Sends a key event to the underlying program.

See also:

Implementation

bool keyInput(
  TerminalLibraryFlutterKey key, {
  bool shift = false,
  bool alt = false,
  bool ctrl = false,
}) {
  final output = inputHandler?.call(
    TerminalLibraryFlutterKeyboardEvent(
      key: key,
      shift: shift,
      alt: alt,
      ctrl: ctrl,
      state: this,
      altBuffer: isUsingAltBuffer,
      platform: platform,
    ),
  );

  if (output != null) {
    onOutput?.call(output);
    return true;
  }

  return false;
}