Repository: flutter
Issue: [Windows Desktop] A KeyUpEvent is dispatched, but the state shows that the physical key is not pressed
Labels: a: text input,framework,platform-windows,a: desktop,a: error message,P2,team-windows,triaged-windows

<!-- Thank you for using Flutter!

     If you are looking for support, please check out our documentation
     or consider asking a question on Stack Overflow:
      * https://flutter.dev/
      * https://api.flutter.dev/
      * https://stackoverflow.com/questions/tagged/flutter?sort=frequent

     If you have found a bug or if our documentation doesn't have an answer
     to what you're looking for, then fill out the template below. Please read
     our guide to filing a bug first: https://flutter.dev/docs/resources/bug-reports
-->


## Code
use `` flutter create --sample=material.TextField.2 mysample``

## Doctor 
```txt
$ flutter doctor
Flutter assets will be downloaded from https://storage.flutter-io.cn. Make sure you trust this source!
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, 2.10.3, on Microsoft Windows [Version 10.0.17763.2565], locale zh-CN)
[!] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
    X Android license status unknown.
      Run `flutter doctor --android-licenses` to accept the SDK licenses.
      See https://flutter.dev/docs/get-started/install/windows#android-setup for more details.
[√] Chrome - develop for the web
[√] Visual Studio - develop for Windows (Visual Studio Community 2019 16.11.5)
[!] Android Studio (not installed)
[√] IntelliJ IDEA Ultimate Edition (version 2021.2)
[!] Proxy Configuration
    ! NO_PROXY does not contain ::1
[√] Connected device (3 available)
[√] HTTP Host Availability

! Doctor found issues in 3 categories.
```

## Steps to Reproduce

<!-- Please include full steps to reproduce so that we can reproduce the problem. -->

1. Execute `flutter run` on the code sample <!-- (see "Code sample" section below) -->
2. swtich IME to microsoft simplified chinese pinyin
3. input chinese character, then press ``Left Shift Key`` and tap others key, wish to input the capital letters
4. the App will crash or cannot delete

**Actual results:** <!-- what did you see? -->

https://user-images.githubusercontent.com/16323430/156962324-fcc5dc84-7310-4cf0-84fd-dd7f394c14f6.mp4


<details>
  <summary>Logs</summary>

```txt
Unable to parse JSON message:
The document is empty.

════════ Exception caught by services library ══════════════════════════════════
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#017a9(physicalKey: PhysicalKeyboardKey#700e1(usbHidUsage: "0x000700e1",  debugName: "Shift Left"), logicalKey: LogicalKeyboardKey#00102(keyId: "0x200000102", keyLabel: "Shift Left", debugName: "Shift Left"), character: null, timeStamp: 72:50:43.724980, synthesized)
'package:flutter/src/services/hardware_keyboard.dart':
package:flutter/…/services/hardware_keyboard.dart:1
Failed assertion: line 441 pos 16: '_pressedKeys.containsKey(event.physicalKey)'
```