I have something like this:

```
const { app, BrowserWindow, BrowserView, globalShortcut} = require('electron');
...
globalShortcut.register("F5", () => {
    alert();
});
```

Adding this `globalShortcut.register` makes Electron crash on startup.

What's the best way to do an action when F5 is pressed, globally (even if there are other browserviews in the main window)?
shell/browser/api/electron_api_global_shortcut.cc
if (base::mac::IsAtLeastOS10_14()) {
    constexpr ui::KeyboardCode mediaKeys[] = {
        ui::VKEY_MEDIA_PLAY_PAUSE, ui::VKEY_MEDIA_NEXT_TRACK,
        ui::VKEY_MEDIA_PREV_TRACK, ui::VKEY_MEDIA_STOP,
        ui::VKEY_VOLUME_UP,        ui::VKEY_VOLUME_DOWN,
        ui::VKEY_VOLUME_MUTE};
    if (std::find(std::begin(mediaKeys), std::end(mediaKeys),
                  accelerator.key_code()) != std::end(mediaKeys)) {
      bool trusted =
          electron::api::SystemPreferences::IsTrustedAccessibilityClient(false);
      if (!trusted)
        return true;
    }
  }
  return false;
}
bool MapHasMediaKeys(