keyOutput method

String? keyOutput(
  1. TerminalKey key, {
  2. bool shift = false,
  3. bool alt = false,
  4. bool ctrl = false,
  5. bool superKey = false,
  6. bool capsLock = false,
  7. bool numLock = false,
  8. TerminalKeyEventType type = TerminalKeyEventType.press,
  9. String? text,
})

What keyInput would send for this key, without sending it: null when the terminal has nothing to send for it. Lets a view tell a key that only types its text from one the running program asked to hear about as a key.

Implementation

String? keyOutput(
  TerminalKey key, {
  bool shift = false,
  bool alt = false,
  bool ctrl = false,
  bool superKey = false,
  bool capsLock = false,
  bool numLock = false,
  TerminalKeyEventType type = TerminalKeyEventType.press,
  String? text,
}) {
  if (_isDisposed) return null;
  if (_keyboardActionMode) return null;
  return inputHandler?.call(
    TerminalKeyboardEvent(
      key: key,
      shift: shift,
      alt: alt,
      ctrl: ctrl,
      superKey: superKey,
      capsLock: capsLock,
      numLock: numLock,
      state: this,
      altBuffer: isUsingAltBuffer,
      platform: platform,
      type: type,
      text: text,
    ),
  );
}