Repository: flutter
Issue: [Web][Windows]: RawKeyboard listener not working as intended on web (Ctrl + D opens bookmark)
Labels: a: text input,c: new feature,framework,engine,f: material design,platform-windows,platform-web,has reproducible steps,P3,found in release: 2.5,found in release: 2.6,team-web,triaged-web



## Steps to Reproduce

```dart
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';

void main() => runApp(MyApp());

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      debugShowCheckedModeBanner: false,
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: const MyHomePage(title: 'Flutter Demo Home Page'),
    );
  }
}

class MyHomePage extends StatefulWidget {
  final String title;

  const MyHomePage({
    Key? key,
    required this.title,
  }) : super(key: key);

  @override
  _MyHomePageState createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> with RawKeyboardListenerMixin {
  int _counter = 0;

  void _incrementCounter() {
    setState(() {
      _counter++;
    });
  }

  @override
  bool get enableKeyListener => true;
  bool isKeyDown(Set<LogicalKeyboardKey> keys) {
    return keys.intersection(RawKeyboard.instance.keysPressed).isNotEmpty;
  }

  @override
  void handleKeyDown(RawKeyDownEvent value) {
    if (isKeyDown(
        {LogicalKeyboardKey.controlLeft, LogicalKeyboardKey.controlRight})) {
      //ctrl + q works
      if (value.logicalKey == LogicalKeyboardKey.keyQ) {
        _incrementCounter();
      }
      //ctrl + d does not works
      if (value.logicalKey == LogicalKeyboardKey.keyD) {
        _incrementCounter();
      }
    }
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text(widget.title),
      ),
      body: Center(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: [
            const Text(
              'Press ctrl + q or ctrl + d to increment the counter\nYou have pushed the button this many times:',
            ),
            Text(
              '$_counter',
              style: Theme.of(context).textTheme.headline4,
            ),
          ],
        ),
      ),
      floatingActionButton: FloatingActionButton(
        onPressed: _incrementCounter,
        tooltip: 'Increment',
        child: const Icon(Icons.add),
      ),
    );
  }
}

mixin RawKeyboardListenerMixin<T extends StatefulWidget> on State<T> {
  // Must be provided by implementing class
  bool get enableKeyListener;

  @override
  void initState() {
    super.initState();
    RawKeyboard.instance.addListener(_handleKey);
  }

  @override
  void dispose() {
    RawKeyboard.instance.removeListener(_handleKey);
    super.dispose();
  }

  void handleKeyUp(RawKeyUpEvent value) {}

  void handleKeyDown(RawKeyDownEvent value) {}

  void _handleKey(RawKeyEvent value) {
    if (enableKeyListener == false) return;
    if (value is RawKeyDownEvent) handleKeyDown(value);
    if (value is RawKeyUpEvent) handleKeyUp(value);
  }
}

```

1. Run the application on web 
2.  Press Ctrl + Q or Ctrl + D to increment the counter

**Expected results:** In both the cases should increment the counter 

**Actual results:** Ctrl + Q works perfectly, but Ctrl + D opens the bookmark tab instead. 

<details>
  <summary>Logs</summary>

<!-- Finally, paste the output of running `flutter doctor -v` here. -->

```
[√] Flutter (Channel stable, 2.5.2, on Microsoft Windows [Version 10.0.19042.1165], locale en-GB)
    • Flutter version 2.5.2 at D:\flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 3595343e20 (11 days ago), 2021-09-30 12:58:18 -0700
    • Engine revision 6ac856380f
    • Dart version 2.14.3

[!] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
    • Android SDK at C:\Users\Vraj\AppData\Local\Android\sdk
    X cmdline-tools component is missing
      Run `path/to/sdkmanager --install "cmdline-tools;latest"`
      See https://developer.android.com/studio/command-line for more details.
    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
    • Chrome at C:\Program Files (x86)\Google\Chrome\Application\chrome.exe

[√] Android Studio (version 3.2)
    • Android Studio at C:\Program Files\Android\Android Studio
    • Flutter plugin version 31.3.1
    • Dart plugin version 181.5656
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1136-b06)

[√] Android Studio (version 3.6)
    • Android Studio at D:\Software\NewAndroidStudio
    • Flutter plugin version 44.0.2
    • Dart plugin version 192.7761
    • Java version OpenJDK Runtime Environment (build 1.8.0_212-release-1586-b04)

[√] IntelliJ IDEA Ultimate Edition (version 2019.1)
    • IntelliJ at C:\Program Files\JetBrains\IntelliJ IDEA 2019.1
    • 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.61.0)
    • VS Code at C:\Users\Vraj\AppData\Local\Programs\Microsoft VS Code
    • Flutter extension version 3.27.0

[√] VS Code, 64-bit edition (version 1.28.2)
    • VS Code at C:\Program Files\Microsoft VS Code
    • Flutter extension version 3.27.0

[√] Connected device (2 available)
    • Chrome (web) • chrome • web-javascript • Google Chrome 94.0.4606.71
    • Edge (web)   • edge   • web-javascript • Microsoft Edge 94.0.992.31

! Doctor found issues in 1 category.
```

</details>