mousetrap
mousetrap copied to clipboard
Support in Electron as a globalShortcut
Big thanks @ccampbell for creating this awesome library. Wanted to know if this library works only with browsers or on Electron too. Any update on this is appreciated.
This is the exact reason I came here is to find the answer to this question. I need Global Shortcuts in an Electron app.
@mviens, @kanalasumant
We have two problems:
- Electron has a limitation with what you can use as a globalShortcut and requires the application to be in focus. (https://github.com/electron/electron/blob/master/docs/api/global-shortcut.md).
- Mousetrap is written with a browser in mind.
I'm working on porting Mousetrap to NodeJS intended to be compatible with a IO Hook module.
https://github.com/matthewshirley/node-mousetrap https://github.com/matthewshirley/node-iohook