undo undos mac code example
Example: mac undo and redo command
Undo or redo changes in Pages on Mac
You can undo recent changes you make to a document, then redo them if you change your mind.
Do any of the following:
Undo the last action: Choose Edit > Undo (from the Edit menu at the top of your screen), or press Command-Z on your keyboard.
Redo the last action you undid: Choose Edit > Redo, or press Command-Shift-Z.