Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions resources/gorilla-repl-client/js/codemirrorVM.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,7 @@ ko.bindingHandlers.codemirror = {
// but I can't seem to get that to work.
CodeMirror.commands['doNothing'] = function () {};
// then patch the Mac default keymap to get rid of the emacsy binding, which interfere with our shortcuts
CodeMirror.keyMap['macDefault'].fallthrough = "basic";
// and then create our custom map, which will fall through to the (patched) default. Shift+Enter and variants
//and then create our custom map, which will fall through to the (patched) default. Shift+Enter and variants
// are stopped from doing anything.
CodeMirror.keyMap["gorilla"] = {
'Shift-Enter': "doNothing",
Expand Down
7 changes: 7 additions & 0 deletions resources/gorilla-repl-client/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,13 @@ var app = function () {
self.saveDialog.show(fname);
});

$(document).on("keydown", function (event) {
if (event.which == 27) {
Mousetrap.enable(Mousetrap.stopCallback());
self.flashStatusMessage("Gorilla keymap: " + Mousetrap.enabled, 2000);
}
});

eventBus.on("app:reset-worksheet", function () {
setBlankWorksheet();
});
Expand Down