Repository: flutter
Issue: Command+Enter on Chrome causes Enter Key to be considered held down
Labels: a: text input,platform-web,has reproducible steps,P2,team-text-input,triaged-text-input,found in release: 3.24,found in release: 3.26

### Steps to reproduce

- Start the supplied code sample in Chrome
- Press CTRL/CMD-Enter.
- Press Shift-K

### Expected results

The configured action for the Shift-K shortcut should run and the text should update to "Shortcut Triggered!"

### Actual results

Nothing happens.

### Code sample

<details open><summary>Code sample</summary>

```dart
import 'package:flutter/material.dart'
    show AppBar, MaterialApp, Scaffold, Theme;
import 'package:flutter/services.dart' show LogicalKeyboardKey;
import 'package:flutter/widgets.dart'
    show
        BuildContext,
        CallbackAction,
        Center,
        FocusableActionDetector,
        FractionallySizedBox,
        Intent,
        LogicalKeySet,
        State,
        StatefulWidget,
        StatelessWidget,
        Text,
        Widget,
        runApp;

void main() {
  runApp(const MyApp());
}

class ShortCutIntent extends Intent {
  const ShortCutIntent();
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return const MaterialApp(
      title: 'Flutter Focus Bug',
      home: MyHomePage(title: 'Flutter Focus Bug'),
    );
  }
}

class MyHomePage extends StatefulWidget {
  const MyHomePage({super.key, required this.title});

  final String title;

  @override
  State<MyHomePage> createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
  var _text = "Press Shift + K to trigger shortcut";

  _rootAction(_) {
    setState(() {
      _text = "Shortcut Triggered!";
    });
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        backgroundColor: Theme.of(context).colorScheme.inversePrimary,
        title: Text(widget.title),
      ),
      body: FocusableActionDetector(
        autofocus: true,
        shortcuts: <LogicalKeySet, Intent>{
          LogicalKeySet(LogicalKeyboardKey.shift, LogicalKeyboardKey.keyK):
              const ShortCutIntent(),
        },
        actions: {
          ShortCutIntent: CallbackAction(onInvoke: _rootAction),
        },
        child: Center(
          child: FractionallySizedBox(
            widthFactor: .8,
            child: Center(
              child:
                  Text(_text, style: Theme.of(context).textTheme.displaySmall),
            ),
          ),
        ),
      ),
    );
  }
}

```

</details>

### Flutter Doctor output

<details open><summary>Doctor output</summary>

```console
[✓] Flutter (Channel stable, 3.24.2, on macOS 14.6.1 23G93 darwin-arm64, locale en-US)
    • Flutter version 3.24.2 on channel stable at /Users/matt/fvm/versions/3.24.2
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 4cf269e36d (9 days ago), 2024-09-03 14:30:00 -0700
    • Engine revision a6bd3f1de1
    • Dart version 3.5.2
    • DevTools version 2.37.2

[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.0)
    • Android SDK at /Users/matt/Library/Android/sdk
    • Platform android-34, build-tools 33.0.0
    • Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b829.9-10027231)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 15.4)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 15F31d
    • CocoaPods version 1.15.2

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2022.3)
    • Android Studio at /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 17.0.6+0-17.0.6b829.9-10027231)

[✓] VS Code (version 1.93.0)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.96.0

[✓] Connected device (3 available)
    • macOS (desktop)                 • macos                 • darwin-arm64   • macOS 14.6.1 23G93 darwin-arm64
    • Mac Designed for iPad (desktop) • mac-designed-for-ipad • darwin         • macOS 14.6.1 23G93 darwin-arm64
    • Chrome (web)                    • chrome                • web-javascript • Google Chrome 128.0.6613.121
    ! Error: Browsing on the local area network for Christina Choriatis’s iPhone (2). Ensure the device is unlocked and attached with a cable or associated with the same local area
      network as this Mac.
      The device must be opted into Developer Mode to connect wirelessly. (code -27)

[✓] Network resources
    • All expected network resources are available.

• No issues found!
```

</details>