handleBackspaceKey method

bool handleBackspaceKey(
  1. KeyEvent event
)

Implementation

bool handleBackspaceKey(KeyEvent event) {
  if (event.logicalKey == LogicalKeyboardKey.backspace) {
    if (document.imeHandler.isComposing) {
      return false;
    }
    document.saveState(description: 'Delete', forceNewAction: false);
    final isApple = !kIsWeb && (Platform.isMacOS || Platform.isIOS);
    final lineStart = isApple && isCtrlPressed;
    final wordDelete = isApple ? isMetaPressed : isCtrlPressed;
    executeHandleBackspace(document, ctrl: wordDelete, lineStart: lineStart);
    return true;
  }
  return false;
}