Implement global shortcuts
Opened this issue · 3 comments
benebsiny commented
Ctrl+Shift+I
opens devtools by default in Electron. However, we must put w.OpenDevTools()
to open the devtool in go-astilectron. Is it possible to make that combination key to open the devtools?
asticode commented
You can add shortcuts using accelerators in your menu items.
However, in your case, you can also add a menu item having its role set to toggledevtools. This should add the proper shortcut automatically.
benebsiny commented
It works, thanks!
This method seems unintuitive. Also, there's a menu bar on top (I don't need it). It would be great if this feature is wrapped as globalShortcut-like object.
asticode commented
It seems like a good idea, I'll rename this issue and keep it open.
Feel free to submit a PR if you feel like implementing it 👍