Repository: flutter
Issue: Keyevent usb-hid code and AltGr
Labels: a: text input,framework,a: internationalization,has reproducible steps,P2,team-framework,triaged-framework,fyi-text-input,found in release: 3.24,found in release: 3.25

### Steps to reproduce

Run the example code on macOS.


### Expected results

1. `PhysicalKeyboardKey`. Usb hid code is `0x68`, but the code should be `0x46` https://www.usb.org/sites/default/files/documents/hut1_12v2.pdf

![image](https://github.com/user-attachments/assets/131065c7-f31d-48e1-8d64-6b3b724c9cc2)


2.  `LogicalKeyboardKey`. Germany (DEU) input. `AltGr` will nerge be generated, instead it generate `Alt Right`.

### Actual results

See above

### Code sample

<details open><summary>Code sample</summary>

```dart
import 'package:flutter/material.dart';

void main() {
  runApp(MyApp());
}

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Keyboard Event Demo',
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: const KeyboardEventPage(),
    );
  }
}

class KeyboardEventPage extends StatefulWidget {
  const KeyboardEventPage({super.key});

  @override
  _KeyboardEventPageState createState() => _KeyboardEventPageState();
}

class _KeyboardEventPageState extends State<KeyboardEventPage> {
  final List<String> _lastKeyEvents = [];
  final FocusNode _focusNode = FocusNode();

  @override
  Widget build(BuildContext context) {
    final child = Scaffold(
      appBar: AppBar(
        title: const Text('Keyboard Event Demo'),
      ),
      body: Center(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: <Widget>[
            const Text(
              'Press any key:',
              style: TextStyle(fontSize: 20),
            ),
            const SizedBox(height: 20),
            for (final keyEvent in _lastKeyEvents)
              Text(
                keyEvent,
                style: const TextStyle(fontSize: 16),
              ),
          ],
        ),
      ),
    );
    return FocusScope(
      autofocus: true,
      child: Focus(
        autofocus: true,
        canRequestFocus: true,
        focusNode: _focusNode,
        onKeyEvent: (node, event) {
          setState(() {
            _lastKeyEvents.add(event.toString());
            if (_lastKeyEvents.length > 10) {
              _lastKeyEvents.removeAt(0);
            }
          });
          return KeyEventResult.handled;
        },
        child: child,
      ),
    );
  }
}

```

</details>


### Screenshots or Video

<details open>
<summary>Screenshots / Video demonstration</summary>

![image](https://github.com/user-attachments/assets/7c850916-9664-418e-9049-3c0f7f237dff)


</details>


### Logs

_No response_

### Flutter Doctor output

<details open><summary>Doctor output</summary>

```console
[✓] Flutter (Channel stable, 3.19.6, on macOS 12.7.5 21H1222 darwin-x64, locale en-US)
    • Flutter version 3.19.6 on channel stable at /Users/admin/workspace/devenv/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 54e66469a9 (4 months ago), 2024-04-17 13:08:03 -0700
    • Engine revision c4cd48e186
    • Dart version 3.3.4
    • DevTools version 2.31.1
    • Pub download mirror https://mirrors.tuna.tsinghua.edu.cn/dart-pub
    • Flutter download mirror https://mirrors.tuna.tsinghua.edu.cn/flutter

[✗] Android toolchain - develop for Android devices
    ✗ Unable to locate Android SDK.
      Install Android Studio from: https://developer.android.com/studio/index.html
      On first launch it will assist you in installing the Android SDK components.
      (or visit https://flutter.dev/docs/get-started/install/macos#android-setup for detailed instructions).
      If the Android SDK has been installed to a custom location, please use
      `flutter config --android-sdk` to update to that location.


[!] Xcode - develop for iOS and macOS (Xcode 14.2)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 14C18
    ! CocoaPods 1.12.1 out of date (1.13.0 is recommended).
        CocoaPods is used to retrieve the iOS and macOS platform side's plugin code that responds to your plugin usage on the Dart
        side.
        Without CocoaPods, plugins will not work on iOS or macOS.
        For more info, see https://flutter.dev/platform-plugins
      To upgrade see https://guides.cocoapods.org/using/getting-started.html#updating-cocoapods for instructions.

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[!] Android Studio (not installed)
    • Android Studio not found; download from https://developer.android.com/studio/index.html
      (or visit https://flutter.dev/docs/get-started/install/macos#android-setup for detailed instructions).

[✓] VS Code (version 1.92.2)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.94.0

[✓] VS Code (version 1.73.1)
    • VS Code at /Users/admin/Downloads/Visual Studio Code.app/Contents
    • Flutter extension version 3.94.0

[✓] Connected device (2 available)
    • macOS (desktop) • macos  • darwin-x64     • macOS 12.7.5 21H1222 darwin-x64
    • Chrome (web)    • chrome • web-javascript • Google Chrome 127.0.6533.120

[!] Network resources
    ✗ An HTTP error occurred while checking "https://github.com/": Connection closed before full header was received

! Doctor found issues in 4 categories.
```

</details>