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 (accelerator_callback_map_.erase(accelerator) == 0)
    return;
#if defined(OS_MAC)
  if (Command::IsMediaKey(accelerator) &&
      !MapHasMediaKeys(accelerator_callback_map_)) {
    GlobalShortcutListener::SetShouldUseInternalMediaKeyHandling(true);
  }
#endif
  GlobalShortcutListener::GetInstance()->UnregisterAccelerator(accelerator,
                                                               this);
}
void GlobalShortcut::UnregisterSome(
    const std::vector<ui::Accelerator>& accelerators) {
  for (auto& accelerator : accelerators) {
    Unregister(accelerator);
  }
}
bool GlobalShortcut::IsRegistered(const ui::Accelerator& accelerator) {
  return base::Contains(accelerator_callback_map_, accelerator);
}
void GlobalShortcut::UnregisterAll() {
  accelerator_callback_map_.clear();
  GlobalShortcutListener::GetInstance()->UnregisterAccelerators(this);
}
gin::Handle<GlobalShortcut> GlobalShortcut::Create(v8::Isolate* isolate) {