keepcalculator

06 Numbers and Powers

Undo Redo Repeat Shortcuts: Windows, Mac & Apps

Card No. 06·55501 · Updated · Standard formula, shown below

The universal keyboard shortcuts are Ctrl+Z (undo), Ctrl+Y (redo), and Ctrl+D (repeat) on Windows, and Cmd+Z, Cmd+Shift+Z, and Cmd+D on Mac. These work in most desktop applications, but the exact behavior of redo and repeat varies by program, so knowing the differences saves time and prevents mistakes.

Background: Why Three Separate Commands?

Undo and redo are the two halves of a reversible action history. Repeat is a third, often-confused command that re-executes your last action — not the reverse of undo. In Microsoft Word, for example, Ctrl+Y is redo, while Ctrl+D repeats the last formatting change (like bolding a word). In Adobe Photoshop, Ctrl+Shift+Z steps forward through history, and Ctrl+Alt+Z steps backward. The distinction matters because hitting the wrong key can duplicate formatting unexpectedly.

How Undo and Redo Work Internally

Most applications store an undo stack — a list of every change you make, from typing a letter to deleting a paragraph. When you press undo, the app pops the latest entry and reverses it. Redo pushes that entry back onto the stack. This is why redo only works immediately after an undo; any new action clears the redo stack. Some apps (like Adobe Illustrator) offer a non-linear history panel where you can jump to any point, but the keyboard shortcut still follows the linear stack.

Choosing the Right Shortcut for Your App

  • Microsoft Office (Word, Excel, PowerPoint): Ctrl+Z undo, Ctrl+Y redo, Ctrl+D repeat (formatting or typing). Excel’s repeat (Ctrl+D) copies the cell above, not the last action.
  • Google Docs / Sheets: Ctrl+Z undo, Ctrl+Y redo, Ctrl+Shift+Z also redo. No dedicated repeat key; use F4 (Windows) or Cmd+Y (Mac) to repeat the last action in Sheets.
  • Adobe Photoshop: Ctrl+Z toggles between undo and redo of the last step; Ctrl+Alt+Z steps backward through history, Ctrl+Shift+Z steps forward.
  • VS Code / Most Code Editors: Ctrl+Z undo, Ctrl+Y redo, and Ctrl+Shift+Z as an alternative redo. Repeat isn’t standard; use multi-cursor or snippets instead.
  • Web Browsers: Ctrl+Z undoes text input in forms, but doesn’t undo page navigation. Use Alt+Left/Right for back/forward.

Common Problems and Misconceptions

“Why doesn’t Ctrl+Y work?” Some apps use Ctrl+Shift+Z for redo (Google, Adobe). “Why can’t I undo my file deletion?” File Explorer has no undo stack for permanent deletes (Shift+Delete). “Why did my redo disappear?” Any new action after an undo clears the redo buffer — this is by design. “Is repeat the same as redo?” No: redo reverses an undo; repeat re-executes the last command. In Word, typing “hello” then pressing Ctrl+D repeats “hello” in a new location, not undoing anything.

Limits and When Undo Fails

Undo depth varies: Microsoft Word keeps 100 actions, Photoshop 50 (configurable), and Notepad only 1. Actions that can’t be undone include file saves, most system settings changes, and operations in apps that don’t implement an undo stack (like basic image viewers). Also, undo doesn’t cross application boundaries — closing and reopening a file resets the stack unless the app offers a version history.

Alternatives: Beyond Keyboard Shortcuts

  • History panels: Photoshop, Illustrator, and Blender offer visual lists of actions — click any entry to jump to that state.
  • Version control: Git (for code) and cloud storage versioning (Google Docs, OneDrive) let you revert to any prior save, far beyond undo depth.
  • Auto-recover: Word and Excel save temporary copies; if the app crashes, you can recover unsaved changes from the backup file.
  • Macros: For repetitive tasks, record a macro (Excel, Word) or use a script (AutoHotkey on Windows, AppleScript on Mac) to automate and undo in bulk.

Frequently Asked Questions

What is the difference between redo and repeat? Redo reverses an undo — it re-applies a change you just undid. Repeat re-executes your last action, such as applying the same formatting to a new selection. They are only identical in apps that define them that way (rare).

Why does Ctrl+Shift+Z sometimes work instead of Ctrl+Y? Google products, many Linux apps, and Adobe software use Ctrl+Shift+Z as the standard redo shortcut. Ctrl+Y is a legacy from early Windows apps. Check the Edit menu — it always shows the correct key.

Can I increase the undo limit in my application? Often yes. In Photoshop, Edit → Preferences → Performance lets you set undo steps from 1 to 1000. In Word, the limit is fixed at 100. Some code editors like VS Code allow configuring undoStop behavior but not the depth.

Why can’t I undo a file rename in Windows Explorer? File Explorer does support undo (Ctrl+Z) for rename, delete, and move operations, but only immediately after the action. If you switch to another app and come back, the undo buffer is often cleared. Permanent deletes (Shift+Delete) are never undoable.

Does undo work after saving a document? In most modern apps, yes — saving does not clear the undo stack. However, closing the file or application does. If you need to revert after closing, use version history (Google Docs) or a backup.

What is the repeat shortcut in Excel for copying down? Ctrl+D copies the cell above into the selected cell(s). It’s a form of repeat but specifically for filling down. To repeat the last general action (like applying a border), press F4 (Windows) or Cmd+Y (Mac).

Related

Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.

More cards in this drawer

The whole Numbers and Powers drawer →