Closed AllanOricil closed 1 year ago
Yeah I'd like this feature too
This can be interesting
I need to be able to register and destroy shortkeys within a sub-component in my app as well as temporarily disable shortkeys used by the main component since I'm working on a social site with a painting app built in.
But yeah, a lot of things don't have buttons tied to them that would be useful to register/destroy
I could not find a way to register a shortkey without an element using this lib.
To achieve the desired result I had to use an eventListener.
It would be good if you could expose a method from your API to be used from the js. Like,