Tech

What is the Ctrl + Z Keyboard Shortcut and How to Use It?

By Steven, on December 8, 2024, updated on December 16, 2024 - 4 min read

The Ctrl + Z shortcut allows you to undo the last action performed on a computer.

Available on all operating systems and compatible with most software, it’s an essential ally to boost productivity and avoid many hassles. But do you really know everything Ctrl + Z can do for you? Debugbar reveals all that this essential keyboard shortcut is capable of to boost your daily productivity.

Ctrl + Z: the universal shortcut to undo an action

Whether you’re on Windows, Mac, or Linux, the Ctrl + Z key combination (or Cmd + Z on Mac) works the same way.

cmd z
ctrlz qwerty

It sends the instruction to the computer to go back and cancel the last operation performed. It’s kind of like a handy “time machine” when you make a mistake.

This works notably for:

  • Text input: if you typed something by mistake, Ctrl + Z will delete what you just wrote.
  • Image modifications: with Photoshop or other editors, Ctrl + Z will undo the last retouch.
  • Layout changes in PowerPoint or Word.
  • File deletion: if you accidentally sent a file to the trash, Ctrl + Z will restore it to its original location.

Plus, the big advantage of Ctrl + Z is that it’s compatible with most software and applications. You can use it in:

  • Microsoft Word,
  • Excel,
  • image editors like Photoshop or GIMP,
  • your web browser (Chrome, Firefox, Edge…),
  • etc.

Even better, Ctrl + Z can be used multiple times in a row to undo previous actions one by one. However, some programs limit the number of possible “undos” to avoid overloading memory. Photoshop for example is limited to 20 consecutive Ctrl + Z‘s.

Ctrl + Z to undo an action in a document

The most common use of Ctrl + Z is when creating or editing a text document. Imagine you’re typing an email or report and you make a typo or accidentally delete a sentence. Instead of retyping everything, a simple Ctrl + Z will allow you to go back.

This also works if you unintentionally move a paragraph, change formatting, or paste text in the wrong place. As long as you don’t close the document, Ctrl + Z will undo the last changes made.

This function is also very useful when working on images or graphics. With Ctrl + Z you can easily revert a crop, color retouch, or filter application. It’s the perfect combo to test modifications risk-free.

Ctrl + Z to undo an action on the computer

The scope of Ctrl + Z is not limited to documents and files. It can also save the day (and lots of time) if you make a wrong move on your computer.

  • Accidentally deleted a file and emptied the trash right after? Don’t panic, just use Ctrl + Z and voila! The file will reappear like magic where it was. Same thing if you move a folder to the wrong location or rename a document by mistake.
  • Inadvertently installed or uninstalled a program? Just press the 2 magic keys right after your mishap to restore the previous action.

Be careful though, this only works for immediate actions. If you close windows in the meantime, it’ll be too late.

What’s the difference between Ctrl + Z and Ctrl + Y?

While Ctrl + Z allows you to undo an action, Ctrl + Y does the exact opposite and allows you to redo an action.

So if you used Ctrl + Z by mistake or changed your mind, Ctrl + Y will allow you to go back to where you were. Like Ctrl + Z, you can press Ctrl + Y multiple times to restore actions one by one.

The icing on the cake is that Ctrl + Y is also compatible with most software and applications.

In short, with these 2 shortcuts, you’ll have total control over your computing actions!

Think you know everything about Ctrl + Z? Well, not yet… This little shortcut can do even more than just undo an action.

Create files with Ctrl + Z in the command prompt

Beyond its undo function, Ctrl + Z can also be used to create empty files directly in the Windows command prompt.

Here’s how:

  1. Open the command prompt terminal by pressing Windows + R then typing “cmd”.
  2. Enter the command copy con filename.txt in the terminal, replacing “filename” with the desired name.
  3. Type your file content then press Control + Z to save and exit.

You’ll then find the created file in your user directory. A handy trick to quickly generate text files without going through an editor.

What to do if Ctrl + Z doesn’t work?

Sometimes Control + Z may stop responding. If that’s the case :

  1. Start by checking that your keyboard is properly connected and recognized by the computer. You can also try unplugging it and plugging it back in.
  2. Try to use another keyboard. You can opt for a standard keyboard or a wireless model according to your preferences.
  3. If Ctrl + Z doesn’t work only on certain software, check in the options that the shortcut hasn’t been modified or disabled. This sometimes happens on non-standard or misconfigured versions.

Control + Z: in short…

  • Ctrl + Z is the universal shortcut to undo the last action on a computer.
  • It works with most software and applications, whether for editing text, images or files.
  • It can be used multiple times in a row to go back step by step.
  • Control + Y does the opposite of Ctrl + Z and allows you to redo the last action.
  • Ctrl + Z can also be used to create files in the Windows command prompt.
  • If you have issues, check your keyboard and software options.

So, ready to master Control + Z? With a little practice, this shortcut will have no secrets for you. And if you really have a memory lapse, remember: Z for Zap!

Steven