I have a new MacBook Pro that I leave plugged in and closed because I use an external display, keyboard, and mouse.

My monitor, keyboard, and mouse are also used by my PC.

When I'm finished with work, I'd like to be able to easily sleep the Mac so that my monitor can automatically switch over to my home PC.

Apple docs say:

Option–Command–Power button* or Option–Command–Media Eject : Put your Mac to sleep

But my Windows keyboard doesn't have a "Media Eject" or "Power" button on it.

What are my other options for easily putting my Mac to sleep?

I already know I could use the mouse to click Apple > Sleep. And I could open the lid and use the power button. But I'd prefer a keyboard command.

  • 1
    The power button is not on the keyboard, but on the top case -that answer from Apple assumes you're using the built in keyboard on the laptop or you're using an Apple keyboard. Alternatively, you could create a simple (Terminal) script with the single command pmset sleepnow then just double click it when you want to sleep your computer.
    – Allan
    Nov 17, 2020 at 22:43

1 Answer 1


Give the Sleep command on the Apple menu a keyboard shortcut in: System Preferences > Keyboard > Shortcuts > App Shortcuts


  • On a Windows keyboard the Windows logo key is the key.
  • System Preferences may first need to be closed for the keyboard shortcut to take affect.

enter image description here

enter image description here

You can assign any unused key combination (like s) using System Preferences » Keyboard » Keyboard Shortcuts » Application Shortcuts. Click the + button. Leave "Application" set as "All Applications". For Menu Title, write Sleep, and under Keyboard Shortcut, press


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .