Repository: flutter
Issue: HID Input not being processed on iOS 13+
Labels: a: text input,platform-ios,a: typography,e: OS-version specific,has reproducible steps,P2,found in release: 2.0,team-ios,triaged-ios

We're tring to use a HID scanner to get input from barcodes. Prior to Flutter 2, we were able to do this on iOS devices, but after updating to Flutter 2, HID input isn't processed on iOS 13+ unless a `TextField` is selected (or possibly some other form of input receiver).

## Steps to Reproduce

1. Create a new Flutter 2 project.
2. Change the `main.dart` and `AppDelegate.swift` to what we have below.
3. Deploy the app to an iOS 13+ device.
4. Send HID input to the iOS device, (Bluetooth keyboard, HID barcode scanners).

**Expected results:** HID inputs are always caught by the AppDelegate.

**Actual results:** HID input is only caught if a `TextField` widget is selected.

Running these steps on Flutter versions prior to 2.0.0 will always get the HID input.

## Code sample

For the Flutter side, you only need a TextField widget:

<details>
  <summary>main.dart</summary>

``` dart
import 'package:flutter/material.dart';

void main() {
  runApp(MyApp());
}

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        body: Center(
          child: TextField(),
        ),
      ),
    );
  }
}


```


</details>

For iOS, we catch calls to `keyCommands` in the AppDelegate. HID input gets printed in the `handleKeyCommand` function.

<details>
  <summary>AppDelegate.swift</summary>

``` swift

import UIKit
import Flutter

@UIApplicationMain
@objc class AppDelegate: FlutterAppDelegate {
  override func application(
    _ application: UIApplication,
    didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
  ) -> Bool {
    GeneratedPluginRegistrant.register(with: self)
    return super.application(application, didFinishLaunchingWithOptions: launchOptions)
  }
    
    override var keyCommands: [UIKeyCommand]? {
        return self.getHidInputKeyCommands(#selector(self.handleKeyCommand(_:)))
    }

    @objc func handleKeyCommand(_ sender: UIKeyCommand) {
        print("Handle Key Command", sender.input as Any)
    }
    
    public func getHidInputKeyCommands(_ selector: Selector) -> [UIKeyCommand] {
        return acceptedCharacters.map {
            return UIKeyCommand(
                input: $0, modifierFlags: [], action: selector
            )
         }
    }

    private let acceptedCharacters = ["]", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "-", "/", ".", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "\n", "\r", "q", "w", "e", "r", "t", "y", "u", "i", "o", "p", "a", "s", "d", "f", "g", "h", "j", "k", "l", "z", "x", "c", "v", "b", "n", "m", "$"]
}


```

</details>

## Flutter Doctor

<details>
  <summary>Output</summary>

```
[✓] Flutter (Channel stable, 2.0.1, on macOS 11.2.2 20D80 darwin-x64, locale en-CA)
    • Flutter version 2.0.1 at /Users/alexanderdunbar/Documents/flutter/flutter
    • Framework revision c5a4b4029c (8 days ago), 2021-03-04 09:47:48 -0800
    • Engine revision 40441def69
    • Dart version 2.12.0

[✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
    • Android SDK at /Users/alexanderdunbar/Library/Android/sdk
    • Platform android-30, build-tools 28.0.3
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6915495)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 12.4, Build version 12D4e
    • CocoaPods version 1.10.0

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 4.1)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6915495)

[✓] IntelliJ IDEA Ultimate Edition (version 2019.2.3)
    • IntelliJ at /Applications/IntelliJ IDEA.app
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart

[✓] Connected device (6 available)
    • SM A505W (mobile)                  • R58M56ED05R                              • android-arm64  • Android 10 (API 29)
    • Android SDK built for x86 (mobile) • emulator-5554                            • android-x86    • Android 7.0 (API 24) (emulator)
    • Silicon’s iPad (mobile)            • 020f3095a1d26dc61dc8dd1b453cecf9b4063d15 • ios            • iOS 14.4
    • iPhone 12 Pro Max (mobile)         • 1871EB42-FD08-45B7-85C4-15304322C9F6     • ios            • com.apple.CoreSimulator.SimRuntime.iOS-14-4 (simulator)
    • iPad Air (mobile)                  • B63C589D-9FA1-4D41-963E-A223C0C5AC33     • ios            • com.apple.CoreSimulator.SimRuntime.iOS-12-4 (simulator)
    • Chrome (web)                       • chrome                                   • web-javascript • Google Chrome 89.0.4389.82

• No issues found!

```

</details>