parro-it / electron-localshortcut

Add keyboard shortcuts locally to a BrowserWindow instance, without using a Menu
MIT License
422 stars 38 forks source link

Pass original event to callback to preventDefault #104

Open johnnybenson opened 4 years ago

johnnybenson commented 4 years ago

When overriding shortcuts that may have existing functionality, you would need to preventDefault.

By passing the event to the callback, it lets the developer decide what to do!

Suggesting as an alternative to https://github.com/parro-it/electron-localshortcut/pull/92