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

feat(event): add keypress listener to control carousel navigation

Open ElijahKotyluk opened this issue 5 years ago • 6 comments

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

Feature Request: #248

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)

ElijahKotyluk avatar Apr 13 '19 18:04 ElijahKotyluk

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 avatar Apr 15 '19 21:04 quinnlangille

@quinnlangille, no worries! Let me know what needs to be changed and I will get on it right away.

ElijahKotyluk avatar Apr 15 '19 22:04 ElijahKotyluk

so... any updates on this?

speculees avatar Aug 20 '20 19:08 speculees

I don’t think this project is maintained anymore unfortunately. But it wouldn’t be hard to implement it yourself.

ElijahKotyluk avatar Aug 20 '20 19:08 ElijahKotyluk

@ElijahKotyluk thanks for prompt reply. Implemented own solution without issues.

speculees avatar Aug 20 '20 20:08 speculees

No problem at all. Glad you were able to achieve key press listeners with ease.

ElijahKotyluk avatar Aug 21 '20 15:08 ElijahKotyluk