Mousetrap is a simple library for handling keyboard shortcuts in Javascript. It is around 1.7kb minified and gzipped and 3kb minified, has no external dependencies, and has been tested in the following browsers: Internet Explorer 6+ Safari Firefox Chrome It has support for keypress, keydown, and keyup events on specific keys, keyboard combinations, or key sequences.