Repository: flutter
Issue: [Linux Web] Clicking `Ctrl + Shift` when textfield is focused throws `A KeyUpEvent is dispatched, but the state shows that the physical key is not pressed exception`.
Labels: a: text input,c: crash,framework,P2,team-framework,triaged-framework

I have a simple Flutter Web application. The view where the problem happens is simple, it contains the `Column` and a `TextField` inside the column. When the text field has a focus and I click `Ctrl Shift` to change the language then an exception is thrown:
```
======== Exception caught by services library ======================================================
The following assertion was thrown during a platform message callback:
Assertion failed: file:///mnt/sdb/flutter/packages/flutter/lib/src/services/hardware_keyboard.dart:441:16
_pressedKeys.containsKey(event.physicalKey)
"A KeyUpEvent is dispatched, but the state shows that the physical key is not pressed. If this occurs in real application, please report this bug to Flutter. If this occurs in unit tests, please ensure that simulated events follow Flutter's event model as documented in `HardwareKeyboard`. This was the event: KeyUpEvent#e15ba(physicalKey: PhysicalKeyboardKey#700e1(usbHidUsage: \"0x000700e1\", debugName: \"Shift Left\"), logicalKey: LogicalKeyboardKey#93867(keyId: \"0x200000102\", keyLabel: \"Shift Left\", debugName: \"Shift Left\"), character: null, timeStamp: 0:00:18.334500, synthesized)"

When the exception was thrown, this was the stack: 
dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/errors.dart 251:49  throw_
dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/errors.dart 29:3    assertFailed
packages/flutter/src/services/hardware_keyboard.dart 441:46                   <fn>
packages/flutter/src/services/hardware_keyboard.dart 451:14                   [_assertEventIsRegular]
packages/flutter/src/services/hardware_keyboard.dart 543:5                    handleKeyEvent
packages/flutter/src/services/hardware_keyboard.dart 821:57                   handleRawKeyMessage
dart-sdk/lib/_internal/js_dev_runtime/patch/async_patch.dart 84:54            runBody
dart-sdk/lib/_internal/js_dev_runtime/patch/async_patch.dart 123:5            _async
packages/flutter/src/services/hardware_keyboard.dart 808:51                   handleRawKeyMessage
packages/flutter/src/services/platform_channel.dart 73:49                     <fn>
dart-sdk/lib/_internal/js_dev_runtime/patch/async_patch.dart 84:54            runBody
dart-sdk/lib/_internal/js_dev_runtime/patch/async_patch.dart 123:5            _async
packages/flutter/src/services/platform_channel.dart 72:58                     <fn>
packages/flutter/src/services/binding.dart 379:35                             <fn>
dart-sdk/lib/_internal/js_dev_runtime/patch/async_patch.dart 84:54            runBody
dart-sdk/lib/_internal/js_dev_runtime/patch/async_patch.dart 123:5            _async
packages/flutter/src/services/binding.dart 376:98                             <fn>
lib/_engine/engine/platform_dispatcher.dart 1034:13                           invoke2
lib/ui/src/ui/channel_buffers.dart 25:5                                       invoke
lib/ui/src/ui/channel_buffers.dart 65:7                                       push
lib/ui/src/ui/channel_buffers.dart 130:16                                     push
lib/_engine/engine/platform_dispatcher.dart 302:25                            invokeOnPlatformMessage
lib/_engine/engine/keyboard.dart 130:39                                       [_handleHtmlEvent]
lib/_engine/engine/keyboard.dart 39:7                                         <fn>
====================================================================================================
```
My platform is Linux and I run the app in the Chrome browser.
After this exception is thrown first time then the `onChanged` handler of the text field stops react over the following inputs.

My flutter doctor output is:

```
[✓] Flutter (Channel stable, 2.5.3, on Linux Mint 19 4.15.0-159-generic, locale en_US.UTF-8)
    • Flutter version 2.5.3 at /mnt/sdb/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 18116933e7 (12 days ago), 2021-10-15 10:46:35 -0700
    • Engine revision d3ea636dc5
    • Dart version 2.14.4

[!] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
    • Android SDK at /home/alex/Android/Sdk
    ✗ cmdline-tools component is missing
      Run `path/to/sdkmanager --install "cmdline-tools;latest"`
      See https://developer.android.com/studio/command-line for more details.
    ✗ Android license status unknown.
      Run `flutter doctor --android-licenses` to accept the SDK licenses.
      See https://flutter.dev/docs/get-started/install/linux#android-setup for more details.

[✓] Chrome - develop for the web
    • Chrome at google-chrome

[✓] Android Studio (version 3.4)
    • Android Studio at /mnt/sdb/android-studio
    • 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_152-release-1343-b16-5323222)

[✓] IntelliJ IDEA Community Edition (version 2020.3)
    • IntelliJ at /mnt/sdb/IDE/idea-IC-203.7148.57
    • Flutter plugin version 53.1.5
    • Dart plugin version 203.7759

[✓] VS Code (version 1.61.1)
    • VS Code at /usr/share/code
    • Flutter extension can be installed from:
      🔨 https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter

[✓] Connected device (1 available)
    • Chrome (web) • chrome • web-javascript • Google Chrome 94.0.4606.81

! Doctor found issues in 1 category.

```