Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to overriding browser shortcuts? #30

Open
TranVanKung opened this issue Jan 9, 2020 · 4 comments
Open

How to overriding browser shortcuts? #30

TranVanKung opened this issue Jan 9, 2020 · 4 comments

Comments

@TranVanKung
Copy link

No description provided.

@TranVanKung
Copy link
Author

TranVanKung commented Jan 9, 2020

I use event.preventDefault(); on onKeyUp but it does not work. It just work on onKeyDown listener

@jaywcjlove
Copy link
Owner

@TranVanKung Only part of the browser shortcuts can be overridden.

@Peppershaker
Copy link

how about control + f?

@Peppershaker
Copy link

<Hotkeys onKeyDown={(keyName, e, handle) => e.preventDefault()} keyName="control+f" onKeyUp={handleSearchHotkey} />

works on latest Chrome and Firefox

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants