electron-window-shortcut

Lets make BrowserWindow based Shortcut in Electron App great again

Usage no npm install needed!

<script type="module">
  import electronWindowShortcut from 'https://cdn.skypack.dev/electron-window-shortcut';
</script>

README

GitHub license Twitter

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

const {
    register,
    unregister,
    attachToWebContent
} = require('electron-window-shortcut');

register('Command+G', (event)=>{
    event.preventDefault();
    console.log('Command+G pressed..');
});

unregister('Command+G');

attachToWebContent(webContent);