Skip to content

Commit d3ebba9

Browse files
estanmarijnh
authored andcommitted
Use Ctrl-Down as close editor shortcut
It's more friendly towards non-US keyboards, where there's no backtick key.
1 parent beeb608 commit d3ebba9

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
@@ -68,7 +68,7 @@ window.addEventListener("load", () => {
6868
Esc(cm) { cm.display.input.blur() },
6969
"Ctrl-Enter"(cm) { runCode(cm.state.context) },
7070
"Cmd-Enter"(cm) { runCode(cm.state.context) },
71-
"Ctrl-`"(cm) { closeCode(cm.state.context) },
71+
"Ctrl-Down"(cm) { closeCode(cm.state.context) },
7272
"Ctrl-Esc"(cm) { resetSandbox(cm.state.context.sandbox) },
7373
"Cmd-Esc"(cm) { resetSandbox(cm.state.context.sandbox) }
7474
}
@@ -135,7 +135,7 @@ window.addEventListener("load", () => {
135135
["Revert to original code", () => revertCode(data)],
136136
["Reset sandbox (ctrl/cmd-esc)", () => resetSandbox(data.sandbox)]]
137137
if (!data.isHTML || !data.sandbox)
138-
items.push(["Deactivate editor (ctrl-`)", () => { closeCode(data) }])
138+
items.push(["Deactivate editor (ctrl-down)", () => { closeCode(data) }])
139139
items.forEach(choice => menu.appendChild(elt("div", choice[0])))
140140
function click(e) {
141141
let target = e.target

0 commit comments

Comments
 (0)