keyInput method
bool
keyInput(
- TerminalKey key, {
- bool shift = false,
- bool alt = false,
- bool ctrl = false,
- TerminalKeyEventType type = TerminalKeyEventType.press,
- String? text,
Implementation
bool keyInput(
TerminalKey key, {
bool shift = false,
bool alt = false,
bool ctrl = false,
TerminalKeyEventType type = TerminalKeyEventType.press,
String? text,
}) {
if (_isDisposed) return false;
if (_keyboardActionMode) return false;
final output = inputHandler?.call(
TerminalKeyboardEvent(
key: key,
shift: shift,
alt: alt,
ctrl: ctrl,
state: this,
altBuffer: isUsingAltBuffer,
platform: platform,
type: type,
text: text,
),
);
if (output != null) {
onOutput?.call(output);
return true;
}
return false;
}