diff --git a/src/index.html b/src/index.html
index 8cafec1..1405985 100644
--- a/src/index.html
+++ b/src/index.html
@@ -222,7 +222,9 @@
>remove selected Menu, Shift+F10, `context menuCtrl+Aselect allShift + ↑ / ↓extend selection
- Escclear selection
+ Escclear selection Ctrl+Zundo last queue change Ctrl+Yredo queue change
@@ -328,6 +330,8 @@
+
+
diff --git a/src/js/input.js b/src/js/input.js
index d46899b..944c455 100644
--- a/src/js/input.js
+++ b/src/js/input.js
@@ -454,6 +454,26 @@ function setupKeyboardShortcuts() {
}
break;
}
+
+ case "KeyZ": {
+ // undo: Ctrl+Z
+ if (e.ctrlKey || e.metaKey) {
+ e.preventDefault();
+ const snapshot = history.undo(snapshotQueue());
+ restoreQueue(snapshot);
+ }
+ break;
+ }
+
+ case "KeyY": {
+ // redo: Ctrl+Y
+ if (e.ctrlKey || e.metaKey) {
+ e.preventDefault();
+ const snapshot = history.redo(snapshotQueue());
+ restoreQueue(snapshot);
+ }
+ break;
+ }
}
});
}