fgr-araujo / vue-shortkey

Vue-ShortKey - The ultimate shortcut plugin to improve the UX
MIT License
884 stars 101 forks source link

Keystroke not recognized on Windows #79

Open jdospina95 opened 5 years ago

jdospina95 commented 5 years ago

When pressing alt while using Windows the keystroke is not recognized, however on Linux it is recognized. I am trying to do a copy paste in my app by pressing the ctrl + alt + c for copy and ctrl + alt + v for paste but it is not currently working since vue-shortkey is not recognizing the key press. I tried switching between keyboard layouts but it seems like the error is not related to that. I am using US-layout.

fgr-araujo commented 5 years ago

I'll try it on Windows. I'm using linux.

mdix commented 5 years ago

Some IEs are using different key values for some keys. Not sure about the alt key tough, but pretty sure about arrowdown, arrowup, arrowleft, arrowright, backspace, tab, enter, escape, delete. I'd suggest using keycodes instead as they're the same in all browsers.

fgr-araujo commented 5 years ago

@mdix #80 solve this?

mdix commented 5 years ago

@iFgR Nope, not solved by this. The linked PR just solves the issue that in IE11 the Event object can not be used as a constructor. A possible fix would be to go with keycodes as they're consistent through all browsers. Just let me know if you're short on time, I'd invest some time in the implementation.

fgr-araujo commented 5 years ago

@mdix I'd appreciate so much if you could help me! I'm changing the city and it's giving me so much time.