diff --git a/src/ui/src/components/Editor.js b/src/ui/src/components/Editor.js index b6bded4..5f48ed6 100644 --- a/src/ui/src/components/Editor.js +++ b/src/ui/src/components/Editor.js @@ -25,7 +25,10 @@ const Editor = ({show, source}) => { }; }, [mode]); - const editorMount = (instance, _) => { + const editorMount = (instance, monaco) => { + instance.addCommand(monaco.KeyMod.CtrlCmd | monaco.KeyCode.KeyC, () => instance.trigger("source","editor.action.clipboardCopyAction")); + instance.addCommand(monaco.KeyMod.CtrlCmd | monaco.KeyCode.KeyV, () => instance.trigger("source","editor.action.clipboardPasteAction")); + instance.addCommand(monaco.KeyMod.CtrlCmd | monaco.KeyCode.KeyX, () => instance.trigger("source","editor.action.clipboardCutAction")); editor.current = instance; }