{"version":3,"file":"keyboard-handler.cjs","sources":["../../../app/extensions/keyboard-handler.ts"],"sourcesContent":["import { EditorView } from \"@codemirror/view\"\n\n/**\n * Extension to handle keyboard events and prevent them from bubbling to window.\n * This prevents window-level event listeners from capturing keyboard events\n * that should be handled only by the editor.\n */\nexport const keyboardHandler = EditorView.domEventHandlers({\n  keydown(event: KeyboardEvent) {\n    // Stop event from bubbling to window\n    event.stopPropagation()\n    // Let CodeMirror handle the keyboard event normally\n    return false\n  },\n  \n  keyup(event: KeyboardEvent) {\n    // Stop event from bubbling to window\n    event.stopPropagation()\n    // Let CodeMirror handle the keyboard event normally\n    return false\n  },\n  \n  keypress(event: KeyboardEvent) {\n    // Stop event from bubbling to window\n    event.stopPropagation()\n    // Let CodeMirror handle the keyboard event normally\n    return false\n  },\n})\n\n"],"names":["EditorView"],"mappings":";;;AAOO,MAAM,kBAAkBA,MAAAA,WAAW,iBAAiB;AAAA,EACzD,QAAQ,OAAsB;AAE5B,UAAM,gBAAA;AAEN,WAAO;AAAA,EACT;AAAA,EAEA,MAAM,OAAsB;AAE1B,UAAM,gBAAA;AAEN,WAAO;AAAA,EACT;AAAA,EAEA,SAAS,OAAsB;AAE7B,UAAM,gBAAA;AAEN,WAAO;AAAA,EACT;AACF,CAAC;;"}