Skip to content

Commit 2380dff

Browse files
committed
Change keybinding for deactivating editor
Ctrl-d is easy to hit accidentally, causing lost work. Issue marijnh#150
1 parent 58cd8bf commit 2380dff

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎html/js/ejs.js‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ window.addEventListener("load", function() {
7575
var keyMap = {
7676
Esc: function(cm) { cm.display.input.blur(); },
7777
"Ctrl-Enter": function(cm) { runCode(cm.state.context); },
78-
"Ctrl-D": function(cm) { closeCode(cm.state.context); },
78+
"Ctrl-`": function(cm) { closeCode(cm.state.context); },
7979
"Ctrl-Q": resetSandbox
8080
};
8181

@@ -129,7 +129,7 @@ window.addEventListener("load", function() {
129129
["Revert to original code", function() { revertCode(data); }],
130130
["Reset sandbox (ctrl-q)", function() { resetSandbox(data.sandbox); }]];
131131
if (!data.isHTML || !data.sandbox)
132-
items.push(["Deactivate editor (ctrl-d)", function() { closeCode(data); }]);
132+
items.push(["Deactivate editor (ctrl-`)", function() { closeCode(data); }]);
133133
items.forEach(function(choice) {
134134
menu.appendChild(elt("div", choice[0]));
135135
});

0 commit comments

Comments
 (0)