vue-shortkey
vue-shortkey copied to clipboard
Binding to an component?
Hey,
I'm not sure this is the right place to ask this but why do I need to add it to a button or div? Is there a way to add a listener for the same keys shortcuts without binding it to an html componant?
Really cool plugin btw (just discovered it)
Thanks!
Do you mean using it programmatically, without the directive?
Yes!
It's not (yet) possible. I'm wondering what's your use case?
Came here with the same idea: I'm trying to add keyboard shortcuts to increment/decrement the current index of a list. For example, I want users to be able to scroll through a list that updates a detail panel without having to use a mouse.
Thinking about the user experience, all actions comes from or affects an element. So, to be more semantic and more explicit I desgined this plugin to be attached and not to be declared.
I will keep this issue opened for a time to see if someone else wants them too
+1 Upvote (I want to use this plugin without the directive)
+1 Upvote