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
const std::vector<ui::Accelerator>& accelerators,
    const base::Closure& callback) {
  std::vector<ui::Accelerator> registered;
  for (auto& accelerator : accelerators) {
    if (!Register(accelerator, callback)) {
      
      UnregisterSome(registered);
      return false;
    }
    registered.push_back(accelerator);
  }
  return true;
}
bool GlobalShortcut::Register(const ui::Accelerator& accelerator,
                              const base::Closure& callback) {
#if defined(OS_MAC)
  if (Command::IsMediaKey(accelerator)) {
    if (RegisteringMediaKeyForUntrustedClient(accelerator))
      return false;
    GlobalShortcutListener::SetShouldUseInternalMediaKeyHandling(false);
  }
#endif
  if (!GlobalShortcutListener::GetInstance()->RegisterAccelerator(accelerator,
                                                                  this)) {
    return false;
  }
  accelerator_callback_map_[accelerator] = callback;
  return true;
}
void GlobalShortcut::Unregister(const ui::Accelerator& accelerator) {