Skip to content

Commit

Permalink
binding cmd-s and ctrl-s to runCode
Browse files Browse the repository at this point in the history
  • Loading branch information
CaDs authored and matiasgarciaisaia committed Mar 2, 2018
1 parent 91a025f commit 163c0cb
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/compiler/crystal/tools/playground/public/session.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@ CodeMirror.keyMap.macDefault["Cmd-/"] = "toggleComment";
CodeMirror.keyMap.pcDefault["Ctrl-/"] = "toggleComment";

CodeMirror.keyMap.macDefault["Cmd-Enter"] = "runCode";
CodeMirror.keyMap.macDefault["Cmd-S"] = "runCode";
CodeMirror.keyMap.pcDefault["Ctrl-Enter"] = "runCode";
CodeMirror.keyMap.pcDefault["Ctrl-S"] = "runCode";

CodeMirror.commands.runCode = function(editor) {
if (editor._playgroundSession) {
Expand Down

0 comments on commit 163c0cb

Please sign in to comment.