8 ms·
Probably relevant to the discussion, the mousetrap library: http://craig.is/killing/mice http://craig.is/killing/mice
by deepakg 14y ago
Probably relevant to the discussion, the mousetrap library:
http://craig.is/killing/mice http://craig.is/killing/mice
- abailin 14y agoThis is my favorite js keyboard plugin by far.
- craigc 14y agoI am the author of this library. Just wanted to point out what other people have said. Using keycodes on there own is not very reliable across different keyboard layouts/international keyboards. Mousetrap defaults to trying to use character codes whenever possible, and for keys that don't send character codes (such as arrow keys, space bar, enter, tab, etc) it falls back to using keycodes. So it should handle all the annoying stuff,cross browser inconsistencies, etc. for you.