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

useHotkeysContext is missing in docs #1104

Open
kachkaev opened this issue Dec 7, 2023 · 2 comments
Open

useHotkeysContext is missing in docs #1104

kachkaev opened this issue Dec 7, 2023 · 2 comments
Labels
documentation Issue regarding the documentation good first issue Good for newcomers

Comments

@kachkaev
Copy link
Contributor

kachkaev commented Dec 7, 2023

Is your feature request related to a problem? Please describe.

I bumped into this library and loved its design. It took me a bit of time to discover useHotkeysContext() and its ability to list all registered keys. First, I found #972 by @zenzen-sol, then explored the source:

hotkeys: ReadonlyArray<Hotkey>

Without this, I would not know about the ability to call const { hotkeys } = useHotkeysContext() which seems to be perfect for showing a list of shortcuts (or at least debugging it).

Describe the solution you'd like
I’d expect to find useHotkeysContext() in https://react-hotkeys-hook.vercel.app/docs/intro. It’d be also good to see a note on hotkeys in README.md. This file mentions the hook but not its ability to return a list of registered shortcuts.

Describe alternatives you've considered
Browsing issues and code

Additional context
Great lib 💯 👏

@JohannesKlauss
Copy link
Owner

True, we could add this a bit more prominently in the docs. If you find any time I'd happy to approve a PR to the docs :)

@JohannesKlauss JohannesKlauss added good first issue Good for newcomers documentation Issue regarding the documentation labels Jan 4, 2024
@kachkaev
Copy link
Contributor Author

kachkaev commented Jan 8, 2024

👋 @JohannesKlauss, thanks for paying attention to this issue! I don’t have spare capacity ATM, so it’d be great if someone else could pick it up. Hope that the issue description gives a bit of guidance. Cheers!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Issue regarding the documentation good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants