electron-window-shortcut
Version:
Lets make BrowserWindow based Shortcut in Electron App great again
30 lines (22 loc) • 911 B
Markdown
[](https://github.com/Syed-Umair/electron-window-shortcut/blob/master/LICENSE)
[](https://twitter.com/intent/tweet?text=Wow:&url=https%3A%2F%2Fgithub.com%2FSyed-Umair%2Felectron-window-shortcut)
# electron-window-shortcut
A Node.js Module for electron apps to bring back the browser window based shortcuts in electron engine >= 3.0.0
## Install Module
```
npm install electron-window-shortcut
```
## Usage
```javascript
const {
register,
unregister,
attachToWebContent
} = require('electron-window-shortcut');
register('Command+G', (event)=>{
event.preventDefault();
console.log('Command+G pressed..');
});
unregister('Command+G');
attachToWebContent(webContent);
```