A keyboard is an essential accessory in a computer system, be it a laptop or a desktop. It’s almost impossible to operate a system without a keyboard, which explains its importance. Moreover, a keyboard can take over important functions in the worst case scenario, for example if your system doesn’t respond to touch inputs or mouse inputs or is broken.

Apple has built various keyboard shortcuts into its Mac operating system, and some of them are specifically designed for situations where your Mac is unresponsive. In such cases, turning off your Mac using the keyboard shortcuts is the only way out.
Your Mac’s power button, which doubles as a Touch ID sensor on some Macs, is the most obvious way to control your Mac. A single press will wake your Mac from sleep mode, while a 1.5 second press will put it to sleep. A long press on the power button will force your Mac to shut down.
You never know when your Mac will let you down, so it’s a good idea to keep these shortcuts in mind. In this guide, you’ll learn more about the shortcuts for hibernating, restarting and shutting down your Mac. Read on to find out more about them.
Table of Contents
Keyboard Shortcuts to Put Your Mac to Sleep
To put your Mac to sleep using keyboard shortcuts, use the following combinations:
- Option + Command + Power/Eject will put your Mac to sleep.

- Control + Shift + Power/Eject puts your Mac’s screens to sleep.

- Control + Power/Eject displays a dialog box asking if you want to restart, shut down or hibernate your Mac.

- Control + Command + Q locks your Mac immediately.

- Shift + Command + Q will log you out of your Mac after you receive confirmation. Press Option + Shift + Command + Q to sign out immediately.

Keyboard Shortcuts to Restart Your Mac
- Control + Command + Power button restarts your Mac forcefully. Any unsaved work will be lost after entering the key combination, so saving your work beforehand is advisable.

- Control + Command + Eject button restarts your Mac after prompting you to save your unsaved work so that it’s not lost in the process.

Keyboard Shortcuts to Shut Down Your Mac
- Control + Option + Command + Power/Eject button shuts down your Mac after quitting all open apps. You will be prompted to save your work if you have not already done so.

It should be noted that some of the above key combinations do not work on Macs with a Touch ID sensor. This is because unlike the eject button on older Macs, the Touch ID sensor on newer Macs is already programmed to put your Mac to sleep when you short press it and force it to shut down when you long press it
If you have an external Apple Magic Keyboard with an eject button, you can connect it to your Mac and continue to use the keyboard shortcuts as intended. In other cases, you will need to power down your Mac completely (in the case of a MacBook) or unplug it (in the case of a Mac Mini, Mac Studio, Mac Pro or iMac).
Bonus Tip: Hot Corners
Hot Corners is a macOS feature that allows you to assign functions to the individual corners of your screen. This allows you to perform an action by dragging your cursor to the corner of the screen, such as launching a screensaver, opening the notification panel or even locking your Mac. Locking your Mac with this method is much more accessible and faster than keyboard shortcuts. Find out how to set up hot corners here:
- Open your Mac’s System Settings.
- Select Desktop & Dock from the left pane.

- Scroll down and click on Hot Corners.

- Open a dropdown menu and select Lock Screen.

- Select Done to save your preferences.

Use Keyboard Shortcuts to Win Back Your Mac’s Controls
So, that’s how you can use your Mac’s keyboard to sleep, restart, or shut down your Mac using keyboard shortcuts. Such shortcuts can prove to be life-saving in situations when your Mac is misbehaving and isn’t responding to your inputs. Although a little tricky to get going initially, you can certainly learn them by using them on a day-to-day basis. In the end, you can set up hot corners to ease the process of locking your Mac.
FAQs about Mac Shortcut Keys to Shut down, Sleep or Restart Mac
1. Why aren’t some keyboard shortcuts working on my Mac?
A likely reason why your Mac isn’t responding to the above keyboard shortcuts could be the presence of the Touch ID sensor. The Touch ID sensor is already programmed with the function to put your Mac to sleep and shut it down. Therefore, the shortcuts will only work if you have a keyboard with an eject or power button.
2. When can these shortcuts come in handy?
You never know when your Mac will stop responding or start misbehaving. In such cases, the only way to turn it off is to restart or shut it down. In such cases, the shortcuts for shutting down and restarting your Mac will help you. The keyboard shortcut for putting your Mac into sleep mode is also helpful for quickly hiding your content so that others cannot see your work.
3. Will these keyboard shortcuts work with external keyboards?
Yes, these keyboard shortcuts work exactly as intended on external Apple Magic Keyboards. However, the shortcuts for the traditional Windows keyboard with various function keys are slightly different. We recommend taking a look at the Microsoft Support article, which describes all the alternative keyboard shortcuts for Mac users with an external keyboard.

