twitwi / deck.js

Better Modern HTML Presentations
http://home.heeere.com/tech-deckjs-ext.html
MIT License
36 stars 9 forks source link

Review key handling (avoid e.which and allow modifiers) #20

Open twitwi opened 7 years ago

twitwi commented 7 years ago

e.g., currently:

vins31 commented 6 years ago

At the moment, using the short to copy "Cmd/Ctrl + C" runs unintentionally the clone plugin. Does this proposal would avoid the aforementioned issue?

twitwi commented 6 years ago

Not originally, but if this gets implemented, it would probably make sense to consider Cmd and Ctrl as the same modifier (at least by default).

Did you encounter the issue with Cmd only or also with Ctrl? The Ctrl case should already be handled by the clone extension https://github.com/twitwi/deck.js/blob/master/extensions/clone/deck.clone.js#L186 Let me know and I'll fix the Cmd key in the clone extension (I guess Cmd+C is most used).

twitwi commented 6 years ago

Here are some links for any possible future work on this feature:

vins31 commented 6 years ago

I forgot to mention I am using macOS (where the copy shortcut uses the Cmd modifier). Indeed, you are right, "Ctrl + C" is OK. Doing the same fix for the Cmd modifier would be very great. Thank you.

twitwi commented 6 years ago

I pushed a tentative fix (untested but I might have typed it right :) ).

vins31 commented 6 years ago

I've just tested it, it works perfectly. Thank you.

twitwi commented 6 years ago

Great. Thanks for the feedback.