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

[FEATURE] Helper for transforming key presses into sequence strings #158

Closed
AndriySvyryd opened this issue Mar 27, 2019 · 4 comments
Closed

Comments

@AndriySvyryd
Copy link

This would be used to redefine hotkeys at runtime.

Something similar to https://github.com/ccampbell/mousetrap/tree/master/plugins/record

@greena13
Copy link
Owner

An interesting idea, @AndriySvyryd.

This may be possible with a little modification.

@greena13
Copy link
Owner

If I am interpreting how that particular mousetrap plugin works correctly, I am not sure I like its approach. It appears that it simply waits for 1 second after the last key event before assuming that the user is done pressing keys, and setting the new key combination or sequence. I think I'd prefer a more explicit action, so as clicking a "Done" button (which would trigger a callback to tell react-hotkeys that the sequence should stop being recorded).

Would that work for your application, @AndriySvyryd?

@AndriySvyryd
Copy link
Author

@greena13 For my application only a single key combination is needed at a time, so it would work best if it stopped recording on the last keyup (to allow for something like ctrl+alt+shift+m to be captured)

@greena13 greena13 changed the title Helper for transforming key presses into sequence strings [FEATURE] Helper for transforming key presses into sequence strings Jun 3, 2019
@greena13
Copy link
Owner

This feature is now available in v2.0.0-pre8.

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

2 participants