this.editor.addAction({
id: "save",
label: "save",
keybindings: [
monaco.KeyMod.chord(monaco.KeyMod.CtrlCmd | monaco.KeyCode.KEY_S),
],
run: saveEditor,//方法
});
saveEditor() {
console.log(1)
};
monaco.KeyMod.chord(monaco.KeyMod.CtrlCmd | monaco.KeyCode.KEY_S)代表ctrl+s