Simple library for handling keyboard shortcuts in Javascript
Mousetrap.addKeycodes
method for adding custom keyCodes not defined in the existing mapTwo quick things
document
if you just call new Mousetrap()
on its own_belongsTo
function to improve performanceThis release is long overdue. It brings a bunch of stuff.
Adds support for creating multiple instances of Mousetrap
Adds support for binding Mousetrap events to specific elements on the page (for example forms or form fields)
For more information see http://craig.is/killing/mice#wrapping
Adds support for using Mousetrap as a common js module
Improves handling of +
key in keyboard commands. Also adds an alias to reference +
as plus
to avoid confusion
General code formatting clean up
If you are using any of the plugins in the plugins directory and you update to Mousetrap 1.5.0 they will break. You have to install the new versions of the plugins. This is because all the public functions are now bound to the Mousetrap prototype instead of being attached to the global object.