Skip to content

Commit 06d3dd5

Browse files
committed
added ctrl s to save
1 parent 2239a64 commit 06d3dd5

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

frontend/javascript/ui.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -544,7 +544,7 @@ function mainEditorUi() {
544544
editor.history.push(historyEntry)
545545
drawMinimap()
546546
}
547-
if ((e.ctrlKey || e.metaKey) && e.code == "KeyZ") {
547+
if ((e.ctrlKey || e.metaKey) && e.code === "KeyZ") {
548548
if (e.shiftKey) {
549549
e.preventDefault()
550550
redo()
@@ -555,6 +555,14 @@ function mainEditorUi() {
555555
}
556556
})
557557

558+
document.addEventListener("keydown", (e) => {
559+
if ((e.ctrlKey || e.metaKey) && e.key === "s") {
560+
console.log("s")
561+
e.stopPropagation()
562+
e.preventDefault()
563+
updateMap()
564+
}
565+
})
558566

559567
}
560568

0 commit comments

Comments
 (0)