Repository: flutter
Issue: Action for LogicalKeyboardKey.enter SingleActivator does not get triggered on web when TextField is focused
Labels: engine,platform-web,has reproducible steps,P2,found in release: 3.10,found in release: 3.12,team-web,triaged-web

### Is there an existing issue for this?

- [X] I have searched the [existing issues](https://github.com/flutter/flutter/issues)
- [X] I have read the [guide to filing a bug](https://flutter.dev/docs/resources/bug-reports)

### Steps to reproduce

1. Run the example on MacOS (this is what i tried, and it works there).
2. Focus the text field.
3. Press enter.
4. Notice that the background changes color.
5. Run the example on Web
6. Execute steps 2 and 3
7. Notice that the background color does not change, but that the text field looses focus

### Expected results

The action should be triggered.

### Actual results

The action is not triggered on Web.

### Code sample

<details><summary>Code sample</summary>

```dart
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';

void main() {
  runApp(const MyApp());
}

class TestIntent extends Intent {}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Shortcuts(
        shortcuts: {
          const SingleActivator(LogicalKeyboardKey.enter): TestIntent()
        },
        child: const ShortcutsIssue(),
      ),
    );
  }
}

class ShortcutsIssue extends StatefulWidget {
  const ShortcutsIssue({Key? key}) : super(key: key);

  @override
  State<ShortcutsIssue> createState() => _ShortcutsIssueState();
}

class _ShortcutsIssueState extends State<ShortcutsIssue> {
  bool _isRed = false;

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      backgroundColor: _isRed ? Colors.red : Colors.white,
      body: Center(
        child: Actions(
          actions: {
            TestIntent: CallbackAction<TestIntent>(
              onInvoke: (_) => setState(() => _isRed = !_isRed),
            )
          },
          child: const TextField(),
        ),
      ),
    );
  }
}
```

</details>


### Screenshots or Video

<details>
<summary>Screenshots / Video demonstration</summary>

https://github.com/flutter/flutter/assets/26022902/e7f9b444-8275-4a75-876e-0dd4e78d36ed

https://github.com/flutter/flutter/assets/26022902/ffe0c10e-a866-485c-90ed-41b3eace10d6

</details>


### Logs

<details><summary>Logs</summary>

```console
[Paste your logs here]
```

</details>


### Flutter Doctor output

<details><summary>Doctor output</summary>

```console
[!] Flutter (Channel stable, 3.10.5, on macOS 13.4 22F66 darwin-arm64, locale en-DE)
    • Flutter version 3.10.5 on channel stable at /Users/tobias/dev/tools/flutter
    ! Warning: `flutter` on your path resolves to /Users/tobias/Dev/Tools/flutter/bin/flutter, which is not inside your current Flutter SDK checkout at /Users/tobias/dev/tools/flutter. Consider adding /Users/tobias/dev/tools/flutter/bin to the front of your path.
    ! Warning: `dart` on your path resolves to /Users/tobias/Dev/Tools/flutter/bin/dart, which is not inside your current Flutter SDK checkout at /Users/tobias/dev/tools/flutter. Consider adding /Users/tobias/dev/tools/flutter/bin to the front of your path.
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 796c8ef792 (7 days ago), 2023-06-13 15:51:02 -0700
    • Engine revision 45f6e00911
    • Dart version 3.0.5
    • DevTools version 2.23.1
    • If those were intentional, you can disregard the above warnings; however it is recommended to use "git" directly to perform update checks and upgrades.

[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.2)
    • Android SDK at /Users/tobias/Library/Android/sdk
    • Platform android-33, build-tools 33.0.2
    • ANDROID_HOME = /Users/tobias/Library/Android/sdk
    • Java binary at: /Users/tobias/Library/Application Support/JetBrains/Toolbox/apps/AndroidStudio/ch-0/222.4459.24.2221.9971841/Android Studio.app/Contents/jbr/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b802.4-9586694)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 14.3.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 14E300c
    • CocoaPods version 1.12.0

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2022.1)
    • Android Studio at /Users/tobias/Library/Application Support/JetBrains/Toolbox/apps/AndroidStudio/ch-0/221.6008.13.2211.9619390/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.15+0-b2043.56-8887301)

[✓] Android Studio (version 2022.2)
    • Android Studio at /Users/tobias/Library/Application Support/JetBrains/Toolbox/apps/AndroidStudio/ch-0/222.4459.24.2221.9971841/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 17.0.6+0-17.0.6b802.4-9586694)

[✓] IntelliJ IDEA Ultimate Edition (version 2023.1.2)
    • IntelliJ at /Users/tobias/Applications/JetBrains Toolbox/IntelliJ IDEA Ultimate.app
    • Flutter plugin version 73.1.1
    • Dart plugin version 231.9065

[✓] IntelliJ IDEA Ultimate Edition (version 2023.1)
    • IntelliJ at /Users/tobias/Library/Application Support/JetBrains/Toolbox/apps/IDEA-U/ch-0/231.8109.175/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

[✓] IntelliJ IDEA Ultimate Edition (version 2023.1.2)
    • IntelliJ at /Users/tobias/Library/Application Support/JetBrains/Toolbox/apps/IDEA-U/ch-0/231.9011.34/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

[✓] VS Code (version 1.79.1)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension can be installed from:
      🔨 https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter

[✓] Connected device (3 available)
    • iPhone 14 Pro (mobile) • 81F2A201-82A9-4AF1-B8E6-6069F3222FB0 • ios            • com.apple.CoreSimulator.SimRuntime.iOS-16-4 (simulator)
    • macOS (desktop)        • macos                                • darwin-arm64   • macOS 13.4 22F66 darwin-arm64
    • Chrome (web)           • chrome                               • web-javascript • Google Chrome 114.0.5735.133

[✓] Network resources
    • All expected network resources are available.

! Doctor found issues in 1 category.
```

</details>