Skip to content
This repository was archived by the owner on Sep 23, 2025. It is now read-only.

Conversation

destradax
Copy link

I noticed that when you add combos like Ctrl + a (which is used by some browsers to select everything in the page), the hotkey callback is fired successfully but the event is not cancelled and hence the default action of the combo is executed (Select All in this case)

@aramando
Copy link

I'd argue this is best left for the user of the library to decide. I always call event.preventDefault() as the first line of all my hotkey callbacks, but it is conceivable that someone might want to augment the default action of a hotkey combo rather than replace it.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants