From 8f1080717ccaf600ba9d50826dbf31bdebefc1d7 Mon Sep 17 00:00:00 2001 From: Marcin Kurczewski Date: Mon, 27 Oct 2014 22:50:07 +0100 Subject: [PATCH] Fixed Alt+D triggering mousetrap D callbacks --- public_html/js/Keyboard.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/public_html/js/Keyboard.js b/public_html/js/Keyboard.js index 4a38da28..7e8aabca 100644 --- a/public_html/js/Keyboard.js +++ b/public_html/js/Keyboard.js @@ -4,6 +4,12 @@ App.Keyboard = function(jQuery, mousetrap) { var oldStopCallback = mousetrap.stopCallback; mousetrap.stopCallback = function(e, element, combo, sequence) { + if (combo.indexOf('ctrl') === -1 && combo.ctrlKey) { + return true; + } + if (combo.indexOf('alt') === -1 && combo.altKey) { + return true; + } if (combo.indexOf('ctrl') !== -1) { return false; }