-
I have editor.commands.addCommand({
name: "save",
bindKey: { win: "Ctrl-S", mac: "Cmd-S" },
exec: (editor) => {
saveFile();
},
}); |
Beta Was this translation helpful? Give feedback.
Answered by
nightwing
Sep 5, 2022
Replies: 1 comment
-
Ace does not have a way to register commands only for key down, but one workaround is to use
before calling saveFile, |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
andrewnester
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Ace does not have a way to register commands only for key down, but one workaround is to use
before calling saveFile,
That said, i think most editors simply use save state to prevent repeated calls and don't distinguish between first and repeated calls.