Github url


by ccampbell

ccampbell /mousetrap

Simple library for handling keyboard shortcuts in Javascript

10.3K Stars 913 Forks Last release: 7 months ago (1.6.5) Apache License 2.0 392 Commits 28 Releases

Available items

No Items, yet!

The developer of this repository has not created any items for sale yet. Need a bug fixed? Help with integration? A different license? Create a request here:



Mousetrap is a simple library for handling keyboard shortcuts in Javascript.

It is licensed under the Apache 2.0 license.

It is around 2kb minified and gzipped and 4.5kb minified, has no external dependencies, and has been tested in the following browsers:

  • Internet Explorer 6+
  • Safari
  • Firefox
  • Chrome

It has support for

, and
events on specific keys, keyboard combinations, or key sequences.

Getting started

  1. Include mousetrap on your page before the closing


We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.