You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 8, 2017. It is now read-only.
Is there a way to retrieve THE key pressed in case of single key? Because I'm not sure I wouldn't interfere with jwerty events, I'm trying to use jwerty for all my keys management. In which case, it happens I need to get the key pressed. How can I? I can do "if jwerty.is('x')", but it can be tedious.
The text was updated successfully, but these errors were encountered:
At current there is no "easy" way to do mass key bindings, other than using jwerty.is.
I have been considering the issue of mass-keybindings though, before this issue. My proposal is to allow an object mapping of keys to functions, allowing you to do something like this:
Thanks for the answer. While posting the issue, I thought that maybe I was not doing things optimally.
I'm doing a webapp, in which I use key combos (and for this, jwerty just rocks), but also single keypresses. I don't feel comfortable at adding my own keydown events, so I had to do it to detect single dead keys, as posted in another issue (how, with jwerty, would you use a dead key to enable a specific mode of your app? Like: normal mouse action is drawing, but if I press Ctrl, same mouse action will result in moving elements? I need a keydown and a keyup callbacks, and as of now, had to do with my own (crappy) code. Though this is another issue, it also comes to the fact I need to "complete" Jwerty, which is a bit less elegant for me.
As for the current issue, here's my need: I use the same callback for two keys (v and h namely), and use the key as an object property, to make it simple.
I have something like:
Is there a way to retrieve THE key pressed in case of single key? Because I'm not sure I wouldn't interfere with jwerty events, I'm trying to use jwerty for all my keys management. In which case, it happens I need to get the key pressed. How can I? I can do "if jwerty.is('x')", but it can be tedious.
The text was updated successfully, but these errors were encountered: