Open fxha opened 6 years ago
I noticed you are using the before-input-event event to listen for shortcuts. Would it be possible to prevent the default action by reading the result from the callback function?
before-input-event
callback
https://github.com/parro-it/electron-localshortcut/blob/3fbd63a6b3ca22368b218ecd39081c0d77d51ddc/index.js#L135
Exactly in this place and call e.preventDefault() if the result is true.
e.preventDefault()
true
Yes, would be great.
Yes, I think too it should be useful. I'll add this in a future version. Or would you mind to write a PR?
@parro-it I'll create a PR for this from my fork in the next days.
thank you!
I noticed you are using the
before-input-event
event to listen for shortcuts. Would it be possible to prevent the default action by reading the result from thecallback
function?https://github.com/parro-it/electron-localshortcut/blob/3fbd63a6b3ca22368b218ecd39081c0d77d51ddc/index.js#L135
Exactly in this place and call
e.preventDefault()
if the result istrue
.