impress / impress.js

It's a presentation framework based on the power of CSS3 transforms and transitions in modern browsers and inspired by the idea behind prezi.com.
http://impress.js.org
MIT License
37.62k stars 6.67k forks source link

Should the goto plugin support non-navigation input keys? #850

Closed mengwong closed 1 year ago

mengwong commented 1 year ago

Currently, the goto plugin recognizes keys like ArrowUp, ArrowDown in data-goto-key-list.

Wouldn't it be nice if the goto plugin could recognize keys like KeyA, KeyB, Digit1, Digit2 as well?

Unless there is a good reason not to do this, I will fork and work toward submitting a PR to support this feature.

janishutz commented 1 year ago

Hhm. What would be the reason for it? I am pretty sure space bar is already in the list. Would you then in that case map the keystroke to a specific step with something like

data-goto-step-key="A"

?

mengwong commented 1 year ago

yes, I will PR a working demo. I thought about it a bit more and realized I was implementing bookmark hotkeys, so I have done it as a bookmark plugin, extending the existing 2d navigation.

janishutz commented 1 year ago

I think you can close this issue now, as you have opened the PR, same with the other one