Skip to content

Commit

Permalink
Properly check if modifiers are present (#959)
Browse files Browse the repository at this point in the history
  • Loading branch information
Kuuuube authored May 17, 2024
1 parent e19204b commit 2e62ddc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ext/js/input/hotkey-handler.js
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ export class HotkeyHandler extends EventDispatcher {
this._hotkeys.clear();
for (const [scope, registrations] of this._hotkeyRegistrations.entries()) {
for (const {action, argument, key, modifiers, scopes, enabled} of registrations) {
if (!(enabled && (key !== null || modifiers !== null) && action !== '' && scopes.includes(scope))) { continue; }
if (!(enabled && (key !== null || modifiers.length > 0) && action !== '' && scopes.includes(scope))) { continue; }
let hotkeyInfo = this._hotkeys.get(key);
if (typeof hotkeyInfo === 'undefined') {
hotkeyInfo = {handlers: []};
Expand Down

0 comments on commit 2e62ddc

Please sign in to comment.