If you’re like most people, you probably use your iPhone to do things like check email, make phone calls, and play games. But there are a lot of ways to accidentally do something on your iPhone that can screw up your day. Here are four different ways to undo something on your iPhone:

  1. Hold down the power button and slide the bottom of the phone up. This will take you to the settings screen.
  2. Hold down the home button and slide the bottom of the phone up. This will take you to the main screen of your iPhone.
  3. Hold down both buttons at once and slide them up or down until they hit a switch or release button (the one in the middle). This will turn on/off your iPhone.
  4. Open up a app and hold down one of the buttons until it says “Open.” Then release it quickly so that it doesn’t turn off again (this is called “sliding”).

If you’ve made a mistake while typing on an iPhone—or you accidentally deleted a bunch of text—you might wonder: Can you undo it? The answer is usually yes, and there are at least four different ways to do it. Here’s how.

Shake to Undo

The oldest method of undoing text entry is called “Shake to Undo.” Apple introduced it in iPhone OS 3.0 way back in 2009, and made it possible to disable in iOS 9. While the feature came enabled for many years, it might be disabled on your iPhone by default in more recent models.

To use Shake to Undo, first make sure it’s enabled. Open the Settings app and navigate to Accessibility > Touch, then flip the switch beside “Shake to Undo” to the on position.

After that, the next time you’re typing and you need to undo something, physically shake your iPhone. When you see an “Undo Typing” pop-up, tap “Undo.”

If you find that you keep accidentally triggering the “Undo Typing” dialog, you can disable “Shake to Undo” by visiting Settings > Accessibility > Touch and turning “Shake to Undo” off.

RELATED: How to Stop the “Undo Typing” Pop-up on iPhone and iPad

Three-Finger Tap to Undo (Two Methods)

There are two ways to undo text entry mistakes with tapping gestures on your iPhone’s screen. While typing, double-tap the screen with three fingers. You’ll see an “Undo” notification at the top of the screen, and your last action will be undone.

Also, in many Apple apps (and some others), you can bring up a formatting bar by single-tapping the screen with three fingers. This bar provides a visual interface for undo, cut, copy, paste, and redo. When it appears at the top of the screen, tap the undo button, which looks like a U-shaped arrow curved to the left.

At any time, you can bring up the formatting bar again and redo what you just undid by tapping the curved arrow that points to the right.

RELATED: How to Use Text Editing Gestures on Your iPhone and iPad

Three-Finger Swipe to Undo

You can also perform an undo action by swiping your iPhone’s screen. To do it, place three fingers on the screen and swipe quickly to the left. You’ll see an “Undo” message pop up near the top of your screen, and the last action will be undone.

To redo (bring back what you just undid), swipe three fingers on your screen to the right.

Command+Z on a Physical Keyboard

If you have a physical keyboard paired with your iPhone, you can use the keyboard to undo text entry in many apps. To do so, press Command+Z on the keyboard. To redo, press Shift+Command+Z. These are the same keyboard shortcuts you’ll find on the Mac.

RELATED: How to Undo (and Redo) on Mac

Undo in Other Apps

While the methods above are supported in most Apple apps, some third-party apps might not support them. If that’s the case, look for a custom “Undo” button (or an icon with an arrow curved backward) somewhere in the interface. You can also try shaking your iPhone to undo, which some developers support. Good luck!