Skip to content

Commit

Permalink
FIX: 同じショートカットキーに2つ以上の操作を割り当てられるように
Browse files Browse the repository at this point in the history
  • Loading branch information
tsym77yoshi committed May 14, 2024
1 parent 3b0ed98 commit ccda7f6
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/plugins/hotkeyPlugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -244,19 +244,19 @@ export class HotkeyManager {

const combination = combinationToBindingKey(eventToCombination(e));

const action = this.actions
const actions = this.actions
.filter((item) => !isInTextbox || item.enableInTextbox)
.filter(
(item) =>
combinationToBindingKey(this.getSetting(item).combination) ==
combination,
)
.find((item) => item.editor.split("&").includes(this.scope));
if (action == null) {
.filter((item) => item.editor.split("&").includes(this.scope));
if (actions.length == 0) {
return;
}
e.preventDefault();
action.callback(e);
actions.forEach((action) => action.callback(e));
}
}

Expand Down

0 comments on commit ccda7f6

Please sign in to comment.