Comment

Comment by federicoweber

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

parent federicoweber 14 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton