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

Expose descriptions in hotkeys array from context provider. #973

Closed
zenzen-sol opened this issue Mar 8, 2023 · 2 comments
Closed

Expose descriptions in hotkeys array from context provider. #973

zenzen-sol opened this issue Mar 8, 2023 · 2 comments

Comments

@zenzen-sol
Copy link
Contributor

The description option for useHotkey is useful for creating a user-facing list of currently-available hotkeys with user-friendly descriptions of each available hotkey.

When calling const { hotkeys } = useHotkeysContext(), the hotkeys array returned should include the contents of the description option, if any.

One question to consider, is whether or not other options, or all options, should also be passed through.

FWIW, I provided one possible solution in #972

@LaurensRietveld
Copy link

This happened to be a usecase we've encountered as well (needing to create a hook wrapper)

@JohannesKlauss
Copy link
Owner

This is released in 4.4.0

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