ccampbell/mousetrap — pull request #64 by wojcikstefan (2012-10-13 04:05:46+00:00)
Title: Bind options and stopping callbacks on a per-bind basis

This change encourages to use the `bind`'s optional argument as a dictionary, but it also maintains backward compatibility, if someone wants to use it as an `action` string or doesn't use it at all. You can also specify if you want to execute callbacks even if the focus is on an editable element like , and .

Examples:
<pre>
Mousetrap.bind('command+f', function(ev) { ... }, { action: 'keypress', includeEditable: true });
// backward compatible:
Mousetrap.bind('command+f', function(ev) { ... }, 'keydown');
Mousetrap.bind('command+f', function(ev) { ... });
</pre>

`includeEditable` if false by default.