diff --git a/src/ScriptEditor/ui/ScriptEditorRoot.tsx b/src/ScriptEditor/ui/ScriptEditorRoot.tsx index 1fc73aaa1..021e74eaa 100644 --- a/src/ScriptEditor/ui/ScriptEditorRoot.tsx +++ b/src/ScriptEditor/ui/ScriptEditorRoot.tsx @@ -277,9 +277,11 @@ export function Root(props: IProps): React.ReactElement { useEffect(() => { function maybeSave(event: KeyboardEvent): void { if (Settings.DisableHotkeys) return; - //Ctrl + b - if (event.keyCode == 66 && (event.ctrlKey || event.metaKey)) { + + // CTRL/CMD + S + if (event.code == `KeyS` && (event.ctrlKey || event.metaKey)) { event.preventDefault(); + event.stopPropagation(); save(); } } @@ -622,7 +624,7 @@ export function Root(props: IProps): React.ReactElement { {ram} - + {" "} Documentation:{" "}