Add const to modifiers, identifier.

This commit is contained in:
voussoir 2026-03-08 14:31:59 -07:00
parent 12a76e2562
commit bffc208fb4

View file

@ -38,7 +38,7 @@ function register_hotkey(hotkey, action, description)
} }
const key = hotkey.pop(); const key = hotkey.pop();
modifiers = hotkey.map(word => word.toLocaleLowerCase()); const modifiers = hotkey.map(word => word.toLocaleLowerCase());
const ctrlKey = modifiers.includes("control") || modifiers.includes("ctrl"); const ctrlKey = modifiers.includes("control") || modifiers.includes("ctrl");
const shiftKey = modifiers.includes("shift"); const shiftKey = modifiers.includes("shift");
const altKey = modifiers.includes("alt"); const altKey = modifiers.includes("alt");
@ -96,7 +96,7 @@ function hotkeys_listener(event)
return; return;
} }
identifier = hotkeys.hotkey_identifier(event.key, event.ctrlKey, event.shiftKey, event.altKey); const identifier = hotkeys.hotkey_identifier(event.key, event.ctrlKey, event.shiftKey, event.altKey);
//console.log(identifier); //console.log(identifier);
if (identifier in hotkeys.HOTKEYS) if (identifier in hotkeys.HOTKEYS)
{ {