Undo in Laptop Shortcut: Keys for Windows and Mac

How-to basics · Updated November 23, 2026

The universal keyboard shortcut for Undo on a laptop is Ctrl + Z on Windows and Chromebooks, and Command (⌘) + Z on Mac. Pressing these keys reverses the most recent action you performed, whether that is typing, deleting a file, formatting text, or moving an object. Holding the keys down repeats the undo command to step back through multiple previous actions.

Why Ctrl+Z (and ⌘+Z) Works on Almost Everything

The Undo shortcut is one of the oldest and most consistent conventions in personal computing. It originated in the 1980s with the Apple Lisa and Macintosh, which used the Command key for shortcuts, and later with Microsoft Windows, which adopted the Control key. Because the shortcut is built into the operating system’s text-editing and file-management frameworks, it works across nearly every application without the developer having to program it manually.

On a laptop, the keys are always present regardless of the keyboard layout. The Ctrl key is typically at the bottom-left, and the Z key is in the bottom row of the letter block. On a Mac, the Command key is the one with the ⌘ symbol, located immediately to the left of the spacebar. This consistency means you can rely on the same two-key combination in web browsers, word processors, image editors, spreadsheets, and even the File Explorer or Finder.

How Undo Works in Different Apps

While the shortcut is universal, the number of undo steps and the behavior of the command vary by program. Most modern applications maintain a history of your actions, allowing you to press Ctrl+Z repeatedly to go back through them. However, some programs limit this history to a certain number of steps (for example, 20 in older versions of Microsoft Word, 100 in Photoshop).

In text editors, undo reverses typing, deletions, formatting changes, and even some actions like inserting images. In file managers, pressing Ctrl+Z after deleting a file restores it to its original location. In image editors, undo reverts brush strokes, filters, and selections. In spreadsheet software like Excel, undo also reverts cell formatting and formula changes, but it does not reverse actions like saving a file.

One important nuance: Undo does not always work after you save a file. In many programs, saving clears the undo history, so you cannot step back past the save point. This is why it is wise to use the shortcut frequently before saving, especially when working on a complex document.

Redo: The Other Half of the Pair

If you undo too far, the Redo shortcut brings your action back. On Windows and Chromebooks, it is Ctrl + Y; on Mac, it is Shift + Command + Z. Some Windows applications also support Ctrl + Shift + Z for Redo, but Ctrl+Y is the standard in Microsoft Office and most Windows software.

Redo is the exact inverse of Undo. It re-applies the action you just undid. For example, if you typed a sentence, pressed Ctrl+Z to remove it, then pressed Ctrl+Y, the sentence reappears. This is useful when you accidentally undo too many steps and want to move forward again.

What to Do When Ctrl+Z Doesn’t Work

There are a few common reasons why the Undo shortcut might appear to fail. First, check that the application you are using actually supports undo for the action you performed. For example, in a web browser, you cannot undo a form submission, but you can undo typing in a text field. Second, some actions are not undoable at all, such as closing a tab in a browser (though you can reopen it with Ctrl+Shift+T) or saving over a file.

If Ctrl+Z does nothing in a specific program, try using the menu bar: look for Edit > Undo or the circular arrow icon in the toolbar. Some applications, especially older or specialized ones, may use a different shortcut, but the menu option always works. Also, ensure your keyboard is functioning correctly—if the Z key is stuck or the Ctrl key is not being recognized, the shortcut will fail.

Alternatives to the Keyboard Shortcut

If you prefer not to use the keyboard, every major operating system offers a graphical way to undo. In Windows, you can click the Undo arrow in the title bar of File Explorer, or use the Edit menu in many programs. In macOS, the Edit menu is always at the top of the screen, and the Undo command is listed with its shortcut. In Google Docs and Microsoft Office, there is an Undo button in the toolbar.

For touch-screen laptops, you can often use a three-finger swipe or a specific gesture, but these are less standardized. The keyboard shortcut remains the fastest and most reliable method across all platforms.

Undo in Specific Laptop Situations

Here are some practical examples of using the Undo shortcut in everyday laptop tasks:

  • Accidentally deleted a file: In Windows File Explorer or macOS Finder, press Ctrl+Z (or ⌘+Z) immediately after deleting to restore the file to its original folder.
  • Typing mistake in a document: Press Ctrl+Z to remove the last word or character, or hold it to delete a longer passage.
  • Moved an icon on the desktop: Press Ctrl+Z to revert the icon to its previous position.
  • Changed formatting in a spreadsheet: Press Ctrl+Z to revert a font change, color fill, or column width adjustment.
  • In a browser, accidentally closed a tab: Undo does not work, but you can reopen the tab with Ctrl+Shift+T (Windows) or ⌘+Shift+T (Mac).

Frequently Asked Questions

Does Ctrl+Z work on a Mac?

No, on a Mac the Undo shortcut is Command+Z. The Control key on a Mac is used for other purposes, like right-clicking, so using Ctrl+Z will not trigger Undo in most Mac applications. If you are using a Windows keyboard on a Mac, the Windows key acts as the Command key, so you would press the Windows key + Z.

How many times can I press Ctrl+Z?

It depends on the application. Most modern programs allow dozens or even hundreds of undo steps, but some have a limit. For example, Microsoft Word allows up to 100 undo actions, while Photoshop allows up to 1000 depending on your settings. Once you exceed the limit, the earliest actions are forgotten.

Why does Ctrl+Z sometimes undo my typing but not my formatting?

In some applications, undo actions are grouped by type. For example, in Microsoft Word, you can undo formatting changes separately from typing. If you press Ctrl+Z and it only undoes one type of action, you may need to press it again to go back to the other type. This behavior varies by program, but it is not a bug.

Can I undo a save in a file?

No, saving a file is not an undoable action. Once you save, the previous version is overwritten. However, some programs like Microsoft Word or Google Docs keep a version history that lets you restore an earlier version, but that is different from Undo. Always save a copy of important files before making major changes.

Is there a way to undo on a laptop without a keyboard?

Yes, you can use the on-screen menu. In most applications, look for an Edit menu at the top and select Undo. On a touch screen, you can also use the toolbar button if available. The keyboard shortcut is faster, but the menu method works in every program.

What is the difference between Undo and Redo?

Undo reverses your last action, while Redo re-applies an action you just undid. For example, if you type “Hello” and then press Ctrl+Z, the text disappears. If you then press Ctrl+Y, the text reappears. Redo only works after you have undone something; it does not redo actions you never undid.

Related

Try it: the Date Difference Calculator: days, months, years and weekdays between two dates, with the DATEDIF formulas.

More in How-to basics

Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources

Spotted an error in this guide? Let us know.