vue-shortkey icon indicating copy to clipboard operation
vue-shortkey copied to clipboard

Binding to an component?

Open luminous8 opened this issue 6 years ago • 7 comments

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!

luminous8 avatar Apr 03 '18 11:04 luminous8

Do you mean using it programmatically, without the directive?

francois2metz avatar Apr 03 '18 13:04 francois2metz

Yes!

luminous8 avatar Apr 03 '18 13:04 luminous8

It's not (yet) possible. I'm wondering what's your use case?

francois2metz avatar May 04 '18 14:05 francois2metz

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.

aschwtzr avatar Jun 18 '18 23:06 aschwtzr

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

fgr-araujo avatar Jun 26 '18 12:06 fgr-araujo

+1 Upvote (I want to use this plugin without the directive)

tdkn avatar Jan 07 '19 04:01 tdkn

+1 Upvote

kwuite avatar Oct 12 '20 11:10 kwuite