Skip to content
This repository has been archived by the owner on Oct 10, 2023. It is now read-only.

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

Open
twitwi opened this issue Aug 23, 2017 · 7 comments
Open

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

twitwi opened this issue Aug 23, 2017 · 7 comments

Comments

@twitwi
Copy link
Owner

twitwi commented Aug 23, 2017

  • event.which is deprecated
  • it could be convenient to provide a simple way to accept modifiers,

e.g., currently:

  • 65 means key 'a'
  • [65, 66] means keys 'a' or 'b'
    but we could imagine accepting something emacs-inspired like
  • ["C-S-65", 66] for control+shift+'a', or 'b'
@vins31
Copy link

vins31 commented Apr 14, 2018

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
Copy link
Owner Author

twitwi commented Apr 14, 2018

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
Copy link
Owner Author

twitwi commented Apr 14, 2018

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

@vins31
Copy link

vins31 commented Apr 14, 2018

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 added a commit that referenced this issue Apr 17, 2018
blind tentative to solve comment from #20
@twitwi
Copy link
Owner Author

twitwi commented Apr 17, 2018

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

@vins31
Copy link

vins31 commented Apr 17, 2018

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

@twitwi
Copy link
Owner Author

twitwi commented Apr 17, 2018

Great. Thanks for the feedback.

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

No branches or pull requests

2 participants