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
return gin::CreateHandle(isolate, new GlobalShortcut(isolate));
}
gin::ObjectTemplateBuilder GlobalShortcut::GetObjectTemplateBuilder(
    v8::Isolate* isolate) {
  return gin::Wrappable<GlobalShortcut>::GetObjectTemplateBuilder(isolate)
      .SetMethod("registerAll", &GlobalShortcut::RegisterAll)
      .SetMethod("register", &GlobalShortcut::Register)
      .SetMethod("isRegistered", &GlobalShortcut::IsRegistered)
      .SetMethod("unregister", &GlobalShortcut::Unregister)
      .SetMethod("unregisterAll", &GlobalShortcut::UnregisterAll);
}
const char* GlobalShortcut::GetTypeName() {
  return "GlobalShortcut";
}
}  
}  
namespace {
void Initialize(v8::Local<v8::Object> exports,
                v8::Local<v8::Value> unused,
                v8::Local<v8::Context> context,
                void* priv) {
  v8::Isolate* isolate = context->GetIsolate();
  gin::Dictionary dict(isolate, exports);
  dict.Set("globalShortcut", electron::api::GlobalShortcut::Create(isolate));
}
}  
NODE_LINKED_MODULE_CONTEXT_AWARE(electron_browser_global_shortcut, Initialize)