fixed: execute first matching shortcut only
This commit is contained in:
parent
670cb9c697
commit
48f1e5e352
4
main.js
4
main.js
|
@ -2183,14 +2183,16 @@ function mainkeydownhandler()
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
commands.filter(c => c.shortcut)
|
commands.filter(c => c.shortcut)
|
||||||
.forEach(command =>
|
.every(command =>
|
||||||
{
|
{
|
||||||
var s = splitshortcut(command.shortcut);
|
var s = splitshortcut(command.shortcut);
|
||||||
if (event.key == s.key && !(s.ctrl && !event.ctrlKey && !event.altKey) && !(s.shift && !event.shiftKey))
|
if (event.key == s.key && !(s.ctrl && !event.ctrlKey && !event.altKey) && !(s.shift && !event.shiftKey))
|
||||||
{
|
{
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
executecommand(command);
|
executecommand(command);
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
return true;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue