Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for Shortcuts? #22

Closed
tobi-or-not-tobi opened this issue Jul 29, 2017 · 4 comments
Closed

Support for Shortcuts? #22

tobi-or-not-tobi opened this issue Jul 29, 2017 · 4 comments

Comments

@tobi-or-not-tobi
Copy link

Hi,
this looks like a great project to me, thanks! From documentation I haven't seen the ability to use shortcuts, i.e. ESC for closing the preview image, arrows to navigate through the images (both in normal mode as well as preview mode).

I'm used to those shortcuts and I believe many end-users as well. It helps to speed up navigation a lot.

@lukasz-galka
Copy link
Owner

Hi @tobi-or-not-tobi there is already option previewKeyboardNavigation for keyboard navigation, you can find all available options here https://github.com/lukasz-galka/ngx-gallery#ngxgalleryoptions

I can add option for closing preview by ESC. In my opinion navigation by keyboard in normal mode can be somethimes problematic for end users, but if you need this option I can implement this :)

@lukasz-galka
Copy link
Owner

I have added option previewCloseOnEsc in version 1.0.5

I my opinion keyboard navigation for normal mode is tricky because you don't have focus on gallery. For example you can have N galleries and you don't know which gallery should take action on keyboard navigation. The same situation if you have image and thumbnails, keyboard navigation should move image or thumbnails? :)

@tobi-or-not-tobi
Copy link
Author

tobi-or-not-tobi commented Jul 29, 2017

You're lightning fast, much appreciated. I'll have a look later on the day and give it a go.

Agreed on this would only work when a gallery element is focussed. It would still make sense from my pov, but only when there's focus.

@tobi-or-not-tobi
Copy link
Author

Works like a charm :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants