|
|
|
|
|
by federicoweber
5007 days ago
|
|
Another javascript library to handle keyboard combos is Mousetrap.
Compared to the latter I like the way Keypress handle multiple combos declaration, but overall mousetrap seems more robust. Also it's not clear to me how Keypress differentiate (if it does so) among a sequence of keys or a combinations.
Mousetrap is using the + notation to handle that so you can declare different bindings for combinations 'command+shift+k' and sequences 'command shift k'. https://github.com/ccampbell/mousetrap |
|
As I mentioned, I didn't actually try using Mousetrap, but from looking at the documentation Keypress should have at least the same features and then some more very specific features that are probably only useful for games.