PC.net

PC Help Center

Answers to Personal Computing Questions

How do I create a sleep shortcut in macOS with a third-party keyboard?

Answer: The standard macOS Sleep shortcut is:

Command+Option+Eject

It is a convenient way to put your desktop Mac to sleep — if you have an Apple keyboard. Most third-party keyboards do not have an Eject key, which makes the Command+Option+Eject keyboard shortcut unusable.

For years, I tried several alternative methods of creating a sleep shortcut with no success. For example, I tried assigning other keys to the Eject command with third-party software. But most keyboard control interfaces, including Razer Synapse and Corsair iCUE, did not provide an assignable "Eject" key. I could assign Play, Pause, Skip, etc, but for some reason "Eject" was never an option in the media controls.

I also tried recording a Sleep macro, but putting the computer to sleep interrupted the macro recording each time. So recording a "Sleep" action was not possible.

Finally, near the end of 2020, I discovered macOS Big Sur supports custom app shortcuts. This gave me hope I could create one for the Sleep command. I tried it and it actually worked!

macOS Custom Keyboard Shortcut System Preference

To create a "Sleep" keyboard shortcut in macOS 11, follow these steps.

  1. Open System Preferences.
  2. Select the Keyboard preference.
  3. Choose the Shortcuts option at the top.
  4. Click App Shortcuts from the left.
  5. Click the "+" symbol on the right to add a new shortcut.
  6. Make sure All Applications is selected.
  7. Type Sleep in the Menu Title field.
  8. Press Tab or click in the Keyboard Shortcut field to select it.
  9. Press your custom keyboard shortcut.
  10. Click Add to save the new shortcut.

Add macOS Custom Keyboard Shortcut

That's it! Now you can use the new keyboard shortcut to put your Mac to sleep.

Choosing a Sleep Keyboard Shortcut

Since the Sleep command will interrupt anything you are doing and put your computer to sleep, choose your shortcut carefully. I recommend using at least a three-key shortcut that you will not press accidentally.

To be safe, I initially chose Command+Option+Down Arrow. But I soon realized it was annoying to use two hands to press all the keys. I changed it to Command+Option+F1, which is easier to use. It's also similar to the Command+Option+Esc shortcut that displays the Force Quit dialog box.

Finally... I don't need to press the power button on my iMac Pro or select "Sleep" from the Apple menu each time I leave my desk. I just press my custom keyboard shortcut and walk away.

Entered: February 16, 2021 – by Per Christensson

Category: Software

Answer from the PC Help Center
https://pc.net/helpcenter/answers/macos_sleep_keyboard_shortcut
space