diff --git a/src/pages/CodeRunner.vue b/src/pages/CodeRunner.vue index 2ef8249..64603d2 100644 --- a/src/pages/CodeRunner.vue +++ b/src/pages/CodeRunner.vue @@ -114,7 +114,7 @@

         
@@ -160,6 +160,7 @@ export default { }, methods: { initEditor() { + let that = this; this.editor = monaco.editor.create( document.getElementById("monocaEditor"), { @@ -174,6 +175,12 @@ export default { }, } ); + this.editor.addCommand( + monaco.KeyMod.CtrlCmd | monaco.KeyCode.KeyB, + function () { + that.runCurrentCommand(); + } + ); }, getEditorValue() { return toRaw(this.editor).getValue();