react-keyboard-shortcuts
react-keyboard-shortcuts copied to clipboard
Updating keyboard shortcuts
Hello, Thanks for the great module!
I was wondering if there's a way to change the keyboard shortcuts after the component has been initialised.
For example, use cases where you would want to give the users the possibility to customise and set their own shortcuts?
Was wondering whether this is already possible and I missed it, or if it is not what would be the best way to add support for it, I'd be happy to do a PR if it's of interest
Thanks is a good use case. At the moment it only connects hotkeys on component mount so you would have unmount and remount the component to get it to change hotkey bindings. If we also exposed a non HOC version then we could do the logic on props and if the hotkeys updated, update the underline mousetrap. I think it is of interest. PR welcome.