Need help with mousetrap?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

10.8K Stars 968 Forks Apache License 2.0 392 Commits 243 Opened issues


Simple library for handling keyboard shortcuts in Javascript

Services available


Need anything else?

Contributors list



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.