diff --git a/ui/options.js b/ui/options.js index a47bec61..34798727 100644 --- a/ui/options.js +++ b/ui/options.js @@ -620,7 +620,7 @@ const SLOptions = { document.addEventListener("keydown", (event) => { if (event.target === document.getElementById("advancedConfigText")) { - if (event.ctrlKey && event.code === "KeyS") { + if (event.ctrlKey && event.key.toLowerCase() === "s") { saveAdvancedConfig(); } } diff --git a/ui/popup.js b/ui/popup.js index 2f543f47..924d0453 100644 --- a/ui/popup.js +++ b/ui/popup.js @@ -788,7 +788,7 @@ const SLPopup = { SLPopup.doSendWithSchedule(schedule); }); document.addEventListener("keydown", (event) => { - if ((event.ctrlKey || event.metaKey) && event.code === `Digit${i}`) { + if ((event.ctrlKey || event.metaKey) && event.key === i.toString()) { // Note: also catches Ctrl+Alt+{i} event.preventDefault(); SLStatic.debug(`Executing shortcut ${i}`); @@ -800,7 +800,7 @@ const SLPopup = { }); document.addEventListener("keydown", function (event) { - if (event.code === "Enter") { + if (event.key === "Enter") { event.preventDefault(); const inputs = SLPopup.objectifyFormValues(); const schedule = SLPopup.parseInputs(inputs);