Fixed Alt+D triggering mousetrap D callbacks

This commit is contained in:
Marcin Kurczewski 2014-10-27 22:50:07 +01:00
parent 111cbff281
commit 8f1080717c

View file

@ -4,6 +4,12 @@ App.Keyboard = function(jQuery, mousetrap) {
var oldStopCallback = mousetrap.stopCallback; var oldStopCallback = mousetrap.stopCallback;
mousetrap.stopCallback = function(e, element, combo, sequence) { 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) { if (combo.indexOf('ctrl') !== -1) {
return false; return false;
} }