vue-carousel
vue-carousel copied to clipboard
feat(event): add keypress listener to control carousel navigation
Added keypress event listener to control carousel navigation.
Description
Created a mixin file that would add a keypress listener, listening for 39(right-arrow) & 37(left-arrow) keys, after the instance is created and remove it before the instance is destroyed.
Motivation and Context
How Has This Been Tested?
I imported the mixin file to the carousel component, ran yarn dev
and tested the arrow keys to see if the carousel images would advance forward or backward.
Types of changes
- [ ] Bug fix (non-breaking change which fixes an issue)
- [x] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
Checklist:
- [x] My code follows the code style of this project.
- [x] My change requires a change to the documentation.
- [ ] I have updated the documentation accordingly.
- [x ] I have included a vue-play example (if this is a new feature)
Hey @ElijahKotyluk, super cool! Thanks for making the PR - I'll take a look at the code tomorrow when I'm in the office, but super glad to have the feature :octocat:
@quinnlangille, no worries! Let me know what needs to be changed and I will get on it right away.
so... any updates on this?
I don’t think this project is maintained anymore unfortunately. But it wouldn’t be hard to implement it yourself.
@ElijahKotyluk thanks for prompt reply. Implemented own solution without issues.
No problem at all. Glad you were able to achieve key press listeners with ease.