Commit af220606 authored by Nicolas Widart's avatar Nicolas Widart

Updating keypress plugin

parent 8aa22b82
...@@ -13,10 +13,9 @@ ...@@ -13,10 +13,9 @@
$.extend(keypressAction.prototype, { $.extend(keypressAction.prototype, {
bindKeyToRoute: function (key, route) { bindKeyToRoute: function (key, route) {
$(document).keypress(function(e) { Mousetrap.bind([key], function(e) {
if (e.which == key) { window.location = route;
window.location = route; return false;
}
}); });
}, },
init: function () { init: function () {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment