Hacker News new | ask | show | jobs
by craigc 5028 days ago
I 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.