diff options
Diffstat (limited to 'theme/javascript/core/keyboard.js')
-rwxr-xr-x | theme/javascript/core/keyboard.js | 39 |
1 files changed, 0 insertions, 39 deletions
diff --git a/theme/javascript/core/keyboard.js b/theme/javascript/core/keyboard.js deleted file mode 100755 index 27a9247..0000000 --- a/theme/javascript/core/keyboard.js +++ /dev/null @@ -1,39 +0,0 @@ -define([ - 'jQuery', - 'Mousetrap', - 'core/navigation', - 'core/sidebar' -], function($, Mousetrap, navigation, sidebar){ - - // Bind a keyboard shortcuts - function bindShortcut(keys, fn) { - Mousetrap.bind(keys, function(e) { - fn(); - return false; - }); - } - - - // Bind keyboard shortcuts - var init = function() { - // Next - bindShortcut(['right'], function(e) { - navigation.goNext(); - }); - - // Prev - bindShortcut(['left'], function(e) { - navigation.goPrev(); - }); - - // Toggle Summary - bindShortcut(['s'], function(e) { - sidebar.toggle(); - }); - }; - - return { - init: init, - bind: bindShortcut - }; -});
\ No newline at end of file |