diff --git a/main.gd b/main.gd index 9eacae2..5c804f3 100644 --- a/main.gd +++ b/main.gd @@ -31,10 +31,12 @@ func _input(event: InputEvent) -> void: step(Vector2i.LEFT) elif event.is_action_pressed("r"): step(Vector2i.RIGHT) - elif event.is_action_pressed("undo"): - hist.undo() + # because most redo keybinds are a superset of undo, we check them first + # e.g. if C-Z, then C-z is pressed elif event.is_action_pressed("redo"): hist.redo() + elif event.is_action_pressed("undo"): + hist.undo() elif event.is_action_pressed("restart"): restart()