shouldDeferPrintableToTextInput static method

bool shouldDeferPrintableToTextInput({
  1. required bool imeAttached,
  2. required bool imeComposing,
  3. TargetPlatform? platform,
})

Returns true when a printable key with no Ctrl/Alt/Meta should return KeyEventResult.ignored from the terminal focus handler.

Implementation

static bool shouldDeferPrintableToTextInput({
  required bool imeAttached,
  required bool imeComposing,
  TargetPlatform? platform,
}) {
  if (!imeAttached) return false;
  if (imeComposing) return true;
  return deferUncomposedPrintableOn(platform ?? defaultTargetPlatform);
}