Repository: flutter
Issue: The isKeyPressed function in RawKeyboardListener behaves differently for korean language
Labels: a: text input,framework,a: internationalization,has reproducible steps,P2,found in release: 3.0,found in release: 3.1,team-framework,triaged-framework

I'm implementing a shortcut, but the `isKeyPressed` function in RawKeyboardListener behaves differently depending on the language of the user's keyboard. I don't know if this is a bug or not, but I want to create a shortcut that behaves the same regardless of the user's language.

## Steps to Reproduce
1. Execute `flutter run` on the code sample.
2. Connect the Bluetooth keyboard to your iOS or iPad.
3. When entering `E` or `e` in English, it works as `is KeyE pressed = true`.
4. When entering the Korean `ㄷ` corresponding to `E` on the English keyboard, it works as `is KeyE pressed = false`.

**Expected results:**
I would like to receive the same `event.isKeyPressed(LogicalKeyboardKey.keyE)` result as `true` whether I type `ㄷ` on a Korean keyboard or an English keyboard when I type `E`.

The physicalKeyboardKey recognizes the Korean word `ㄷ` as Key E. However, the `isKeyPressed` function returns `false` because it checks whether they are the same using LogicalKeyboardKey internally.

https://user-images.githubusercontent.com/26322627/172360844-059490ef-2bd7-42f0-aefd-c7c6ca74b4e3.MP4

<details>
<summary>Code sample</summary>

```dart
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatefulWidget {
  const MyApp({Key? key}) : super(key: key);

  @override
  State<MyApp> createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  FocusNode focusNode = FocusNode();
  bool isKeyEPressed = false;
  Set<PhysicalKeyboardKey> pressedKeys = {};
  RawKeyEvent? keyEvent;

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        body: RawKeyboardListener(
          focusNode: focusNode,
          onKey: (event) {
            if (event.runtimeType == RawKeyDownEvent) {
              setState(() {
                keyEvent = event;
                pressedKeys = RawKeyboard.instance.physicalKeysPressed;
                isKeyEPressed = event.isKeyPressed(LogicalKeyboardKey.keyE);
              });
            }
          },
          child: SizedBox(
            width: double.infinity,
            child: Padding(
              padding: const EdgeInsets.all(8.0),
              child: Column(
                mainAxisAlignment: MainAxisAlignment.center,
                children: [
                  const Text("English keyboard E == Korean keyboard ㄷ"),
                  const SizedBox(height: 16),

                  /// TextField
                  const Text("<TextField>"),
                  const TextField(autofocus: true),
                  const SizedBox(height: 16),

                  /// Pressed Keys
                  const Text("<pressedKeys>"),
                  Text(pressedKeys.toString(), textAlign: TextAlign.center),

                  /// Key event
                  const SizedBox(height: 16),
                  const Text("<keyEvent>"),
                  Text(keyEvent.toString(), textAlign: TextAlign.center),

                  /// Is KeyE Pressed
                  const SizedBox(height: 16),
                  const Text("<is keyE pressed>"),
                  Text(isKeyEPressed.toString()),
                ],
              ),
            ),
          ),
        ),
      ),
    );
  }
}
```

</details>

<details>
  <summary>flutter doctor -v</summary>

```
[✓] Flutter (Channel master, 3.1.0-0.0.pre.1136, on macOS 12.0.1 21A559 darwin-x64, locale ko-KR)
    • Flutter version 3.1.0-0.0.pre.1136 at /Users/nero/Project/FlutterContribution/flutter
    • Upstream repository git@github.com:nero-angela/flutter
    • Framework revision 8700239ac6 (7 hours ago), 2022-06-06 22:53:08 -0400
    • Engine revision 577337792c
    • Dart version 2.18.0 (build 2.18.0-170.0.dev)
    • DevTools version 2.14.0

Checking Android licenses is taking an unexpectedly long time...[✓] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
    • Android SDK at /Users/nero/Library/Android/sdk
    • Platform android-31, build-tools 31.0.0
    • Java binary at: /Volumes/Lecture HD/Applications/Android
      Studio.app/Contents/jre/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.12+0-b1504.28-7817840)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 13.3.1)
    • Xcode at /Applications/Xcode-13.3.1.app/Contents/Developer
    • CocoaPods version 1.11.2

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 3.6)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin version 44.0.2
    • Dart plugin version 192.7761
    • Java version OpenJDK Runtime Environment (build 1.8.0_212-release-1586-b4-5784211)

[✓] Android Studio (version 2021.2)
    • Android Studio at /Volumes/Lecture HD/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 11.0.12+0-b1504.28-7817840)

[✓] VS Code (version 1.67.2)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.42.0

[✓] VS Code (version 1.66.2)
    • VS Code at /Volumes/Lecture HD/Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.42.0

[✓] Connected device (4 available)
    • nero의 iPad (mobile) • 00008027-000A41CE0C0A402E                • ios            • iOS 15.4.1
      19E258
    • Nero (mobile)       • 25523857876efd7b29d022582b18bb17ab9f9d92 • ios            • iOS 15.4.1
      19E258
    • macOS (desktop)     • macos                                    • darwin-x64     • macOS 12.0.1
      21A559 darwin-x64
    • Chrome (web)        • chrome                                   • web-javascript • Google Chrome
      102.0.5005.61

[✓] HTTP Host Availability
    • All required HTTP hosts are available

• No issues found!
```

</details>


<!--
      Consider also attaching screenshots and/or videos to better
      illustrate the issue.

      You can upload them directly on GitHub.
      Beware that video file size is limited to 10MB.
-->