Have you accidentally deleted an important file, sent a message to the wrong person, or applied the wrong formatting to a document? In 90% of cases, these errors can be corrected in seconds - if you know the correct key combinations. Laptops, unlike desktop PCs, often lack additional buttons (for example, Print Screen or Scroll Lock), which makes accessing some functions more difficult. This article will reveal all possible ways to cancel actions via keyboard - from basic Ctrl+Z to little-known tricks for Windows, macOS And Linux.

We won't just list the keyboard shortcuts, we'll explain mechanisms of their work: why Ctrl+Y returns the canceled action, how the undo buffer works in different programs, and what to do if standard methods do not work. Particular attention is paid hidden functions of laptops with a touchbar (for example, MacBook Pro) and 2-in-1 hybrid devices, where the keyboard may behave non-standard. Ready to take back control of your actions?

Basic keyboard shortcuts for undoing actions

Let's start with universal combinations that work in 99% of programs - from text editors to graphics packages. These keys are implemented at the operating system level, so their action does not depend on specific software (with rare exceptions).

The most famous combination is Ctrl+Z (or Command+Z on macOS). It cancels last action performed, whether it's deleting text, moving a file, or changing image settings. But few people know that:

  • 🔄 Multiple cancellations: Press Ctrl+Z several times in a row to roll back several steps (the depth of the history depends on the program).
  • ↩️ Refund Cancellation: If you overdo it Ctrl+Z, return the action with a combination Ctrl+Y (Command+Shift+Z on Mac).
  • 🚫 Exceptions: In some games and specialized software (for example, AutoCAD) these keys can be overridden.

For laptops with a compact keyboard (e.g. Lenovo Yoga or Dell XPS 13) may need to hold down a function key Fn to access F1-F12. This is important if the program uses these keys to cancel (for example, F2 in Excel to edit a cell).

📊 What OS do you use on your laptop?
  • Windows
  • macOS
  • Linux
  • ChromeOS
  • Another

Undoing actions in specific programs

Universal combinations do not always cover all needs. Let's look at how to undo actions in popular applications where standard methods may not work or work differently.

B Microsoft Office (Word, Excel, PowerPoint) default undo depth is 100 actions, but it can be increased:

  1. Go to File -> Options -> Advanced.
  2. Find a section Edit and set the maximum value (up to 150).

B Adobe Photoshop the history of changes is saved in the panel Window → History. Here you can cancel actions not only with the keys, but also by clicking on the desired step. Please note:

  • 🖼️Saving a file resets history - after this it will be impossible to undo the changes.
  • 🔄 Default Photoshop remembers the last 50 actions, but this value can be increased by Edit → Settings → Performance.

Make sure the layer is not locked

Check if the file is saved (autosave may reset the history)

Use Ctrl+Alt+Z to cancel step by step (instead of Ctrl+Z)

Disable tools with "non-cancelable" effects (eg. Filter → Sharpen)

-->

In browsers (Chrome, Firefox, Edge) combination Ctrl+Z Works only for canceling entered text in forms. To bring back a closed tab, use Ctrl+Shift+T - this will work even after restarting the browser (if the session has not been cleared).

Cancel system actions in Windows

The operating system allows you to undo not only actions in programs, but also system changes - from moving files to installing updates. Here are the key scenarios:

1. Cancel moving/deleting files

  • 📁 If you dragged the file to another folder, immediately click Ctrl+Z - this will return it to its original place.
  • 🗑️ For files deleted via Shift+Delete (bypassing the shopping cart), only specialized software like Recuva or Disk Drill.
  • 🔍 B Windows Explorer The history of file operations is stored until the window is closed. Once restarted, cancellation will no longer be possible.

2. Rollback updates

If, after updating Windows, your laptop begins to perform worse, return to the previous version:

  1. Open Settings → Update & Security → Recovery.
  2. In the section Go back to the previous version of Windows 10 click Start.
  3. Follow the instructions (the process will take 20-40 minutes).
What to do if the "Back" button is grayed out?

This means that Windows has automatically deleted the files from the previous version (usually 10 days after the update). In this case, only a system backup or a clean OS installation will help.

3. Undoing changes to the registry

If you manually edited the registry via regedit, you can only undo changes if you have previously created a backup copy. To do this:

  1. Open regedit (click Win+R, enter regedit).
  2. Select File → Import and load the previously saved .reg-file.
💡

Before making any changes to the registry, export the current key: select it, click File → Export and save the file to your desktop.

macOS Specifics: Cancel on MacBook

Laptops Apple use a different philosophy of action management. There's no key here Ctrl - fulfills her role Command (⌘). Main differences:

1. Cancellation and return of actions

  • ⌘+Z — cancel the last action (analogue Ctrl+Z).
  • ⌘+Shift+Z — return the undone action (instead of Ctrl+Y).
  • ⌘+Option+Z — step-by-step cancellation (shows all previous states as in Photoshop).

2. Finder Features

In the file manager macOS cancellation works differently than in Windows:

  • 📁 Moving files between folders is canceled after ⌘+Z, but only if the windows Finder were not closed.
  • 🗑️ Deleted files are sent to Cart, from where they can be restored within 30 days (or until the Trash is emptied).
  • 🔄 To recover files from Baskets drag them back or right-click → Put back.

3. Time Machine is a lifeline

If standard cancellation doesn't help, use Time Machine:

  1. Connect the backup drive (if it is not connected automatically).
  2. Open the folder where the file was located and run Time Machine via the menu or docking station.
  3. Select the desired date and restore the file.
💡

On MacBook with Touch Bar combinations ⌘+Z And ⌘+Y may not appear on screen, but they work regardless of visual cues.

Undoing actions on Linux and ChromeOS

Distributions Linux (For example, Ubuntu, Fedora) and ChromeOS use the same basic combinations as Windows, but with nuances:

1. Linux (GNOME/KDE)

  • 🐧 Works in most environments Ctrl+Z, but in the terminal this combination pauses the process (to continue, enter fg).
  • 📁 In the file manager Nautilus (GNOME) You can only cancel moving files before closing the window.
  • 🔄 To cancel in the terminal, use Ctrl+Shift+Z (if supported by the shell, e.g. Zsh).

2. ChromeOS

  • 💻 Here Ctrl+Z works in web applications and Google Docs, but does not cancel system actions.
  • 📱 To cancel on the touchpad (if the laptop is convertible), use the “swipe left with three fingers” gesture.
  • 🔄 In the file manager, cancellation is available only for operations performed in the current session.

3. Linux Terminal: Canceling Commands

You cannot undo a executed command on the command line, but you can:

  • 🛑 Interrupt the current process: Ctrl+C.
  • 📜 Cancel input (clear line): Ctrl+U.
  • 🔙 Return the last deleted command: type !! and press Enter.

What to do if cancel doesn't work

Sometimes standard methods fail. Let's consider alternative recovery methods:

1. Autosave and backups

  • 💾 Microsoft Office Automatically saves drafts every 10 minutes. To restore: File → Details → Document Management → Recover Unsaved Workbooks.
  • 🖥️ B Windows 10/11 turn on File history: Settings → Update and Security → Backup Service.
  • ☁️ Cloud services (Google Drive, Dropbox) store file versions for up to 30 days. Open the web version of the service and check Version history.

2. Specialized software

Problem Program Features
Deleted files Recuva, EaseUS Data Recovery It works even after emptying the Recycle Bin, but does not guarantee recovery of overwritten data.
Errors in documents OfficeFilerecovery Recovers damaged files Word/Excelif they don't open.
System failures Macrium Reflect, Acronis True Image Requires prior creation of a system image.
Deleted disk partitions TestDisk, MiniTool Partition Wizard For experienced users, incorrect use can make the problem worse.

3. Hardware methods

If software methods do not help, radical measures remain:

  • 🔧 Reset BIOS/UEFI: If the laptop does not boot after changing the BIOS, remove the CMOS battery (on desktop PCs) or use the reset jumper (on some models Lenovo And HP).
  • 💿 Recovery from a flash drive: Create bootable media with Windows/macOS and select System Restore.
💡

On laptops with SSD the chances of recovering deleted files are lower than HDD, due to the function TRIM, which immediately clears memory cells.

Hidden features of a laptop keyboard

Laptop manufacturers often add unique key combinations to override specific actions. Here are the most useful of them:

1. Function keys (F1-F12)

  • 🔄 Lenovo: Fn+F9 - undo the last action in Lenovo Vantage (system management).
  • 📺 HP: Fn+F11 — cancel changes to screen brightness/contrast.
  • 🔊 Dell: Fn+F1 — Reset sound settings to standard.

2. Touchbar on MacBook Pro

On models with Touch Bar (2016 and newer) canceling actions may be duplicated on the screen:

  • 🖱️ Press and hold the button Cancel on Touch Barto see your activity history.
  • 🔄 In some applications (for example, Final Cut Pro) is displayed here History with the ability to select a step to cancel.

3. 2-in-1 hybrid devices

On convertible laptops (for example, Microsoft Surface or Asus ZenBook Flip) the keyboard can be disabled in tablet mode. To return functionality:

  • 📱 Click Win+XMobile centerTablet mode (turn it off).
  • 🔄 If the keyboard does not respond, reboot the device with a physical keyboard connected (via USB or Bluetooth).
💡

On some laptops (eg Acer Swift) key Fn blocked by default. To unlock, click Fn+Esc or change the setting in BIOS.

FAQ: Frequently asked questions about undoing actions

Is it possible to cancel a sent email in Gmail?

Yes, but only for a period 30 seconds after sending. To do this:

  1. Enable the feature in settings: Gear → Settings → Cancel sending.
  2. Set the delay time (maximum 30 seconds).
  3. After sending the letter, a button will appear at the bottom of the screen Cancel.

For other email services (for example, Yandex or Mail.ru) there is no such function.

Why doesn't Ctrl+Z work in Photoshop?

B Photoshop Ctrl+Z only cancels last action. For step-by-step undo use:

  • Ctrl+Alt+Z - roll back a few steps.
  • Ctrl+Shift+Z - return forward.

If the combinations don't work, check:

  • Is a tool selected that blocks undoing (for example, Type Tool in text editing mode).
  • Whether the history limit has been reached (50 steps by default).
How to cancel driver updates in Windows?

If, after updating the drivers, the laptop begins to perform worse (for example, the sound is lost or Wi-Fi does not work), perform a rollback:

  1. Open Device Manager (Win+X → Device Manager).
  2. Find the problematic device (for example, Sound, video and gaming devices).
  3. Right click → Properties → Driver → Roll Back.

If the button Rollback is inactive, download the previous version of the driver from the laptop manufacturer's website.

Is it possible to undo formatting a disk?

If you formatted a disk (for example, a flash drive), the chances of data recovery depend on the type of formatting:

  • Quick formatting: Files can be recovered using Recuva or R-Studio (do not write new data to disk!).
  • Full formatting: Data is overwritten with zeros - recovery is almost impossible.

For system disk (C:) the only way is to restore from a backup.

How to disable the Ctrl+Z combination in a specific program?

If Ctrl+Z interferes with the game or specialized software, it can be reassigned:

  • B Windows: Use utilities like AutoHotkey to create a custom script.
  • B macOS: Open System Preferences → Keyboard → Keyboard Shortcuts → Application Shortcuts and add a new rule.
  • B Linux: Configure combinations in the window manager options (for example, GNOME Tweaks).

Example script for AutoHotkey (disables Ctrl+Z in Notepad++):

#IfWinActive ahk_exe notepad++.exe

^z::return

#IfWinActive