fixed: execute first matching shortcut only

This commit is contained in:
quenousimporte 2023-05-05 11:58:39 +02:00
parent 670cb9c697
commit 48f1e5e352
1 changed files with 3 additions and 1 deletions

View File

@ -2183,14 +2183,16 @@ function mainkeydownhandler()
else
{
commands.filter(c => c.shortcut)
.forEach(command =>
.every(command =>
{
var s = splitshortcut(command.shortcut);
if (event.key == s.key && !(s.ctrl && !event.ctrlKey && !event.altKey) && !(s.shift && !event.shiftKey))
{
event.preventDefault();
executecommand(command);
return false;
}
return true;
});
}
}