diff --git a/gruntfile.js b/gruntfile.js index 719f2fac..e22f94db 100644 --- a/gruntfile.js +++ b/gruntfile.js @@ -79,7 +79,7 @@ module.exports = function(grunt) { files: [ { src: 'node_modules/jquery/dist/jquery.min.js', dest: 'public_html/lib/jquery.min.js' }, { src: 'node_modules/jquery.cookie/jquery.cookie.js', dest: 'public_html/lib/jquery.cookie.js' }, - { src: 'node_modules/mousetrap/mousetrap.min.js', dest: 'public_html/lib/mousetrap.min.js' }, + { src: 'node_modules/Mousetrap/mousetrap.min.js', dest: 'public_html/lib/mousetrap.min.js' }, { src: 'node_modules/pathjs/path.js', dest: 'public_html/lib/path.js' }, { src: 'node_modules/underscore/underscore-min.js', dest: 'public_html/lib/underscore.min.js' }, { src: 'node_modules/marked/lib/marked.js', dest: 'public_html/lib/marked.js' }, diff --git a/package.json b/package.json index 0fef077e..b430333b 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,7 @@ "jquery.cookie": "1.4.1", "jquery": "~2.1.1", "underscore": "1.7.0", - "mousetrap": "0.0.1", + "mousetrap": "git://github.com/ccampbell/mousetrap.git", "marked": "~0.3.2", "requirejs": "*", diff --git a/public_html/js/Keyboard.js b/public_html/js/Keyboard.js index d981185a..0c90839b 100644 --- a/public_html/js/Keyboard.js +++ b/public_html/js/Keyboard.js @@ -4,20 +4,12 @@ App.Keyboard = function(mousetrap) { function keyup(key, callback) { unbind(key); - mousetrap.bind(key, simpleKeyPressed(callback), 'keyup'); + mousetrap.bind(key, callback, 'keyup'); } function keydown(key, callback) { unbind(key); - mousetrap.bind(key, simpleKeyPressed(callback)); - } - - function simpleKeyPressed(callback) { - return function(e) { - if (!e.altKey && !e.ctrlKey) { - callback(); - } - }; + mousetrap.bind(key, callback); } function reset() {