(event: KeyboardEvent, save: (() => void) | null | undefined): void import {handle_save_shortcut_keydown} from '@fuzdev/zzz/save_shortcut.js'; Calls save on Ctrl+S / Cmd+S (case-insensitive, without Alt), swallowing
the event so the browser's save dialog never opens and a page-level
listener never saves a different editor than the focused one. An event a
handler already took (defaultPrevented) is ignored, and a held key saves
once per press.
event
the keydown event
KeyboardEventsave
the editor's save, or nullish to let the event through untouched
(() => void) | null | undefinedreturns
void mutates
event— swallowed (`preventDefault` + `stopImmediatePropagation`) when it's the shortcut