Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am looking for a quick way to sleep without closing the lid, or using the mouse.

If it matters, I have Lion version OS and a MacBook Air.

share|improve this question

If others do have a keyboard with an eject key, you can just press Command ⌘+Option ⌥+Eject ⏏.

Other shortcuts:

Control ^+Shift ⇧+Eject ⏏ - Put displays to sleep
Command ⌘+Control ^+Eject ⏏ - Restart
Command ⌘+Control ^+Option ⌥+Eject ⏏ - Shut down

If others like the OP have a MacBook Air or a MacBook Pro with a power key in place of an eject key, substituting the power key for eject should work in Mountain Lion and later versions of OS X, but not in Lion.

Since Mavericks, another option is to just press the power button or power key. It now puts a Mac to sleep instead of showing a dialog with different options.

If you don't have a keyboard with an eject or power key, you can use a private.xml like this with KeyRemap4MacBook:

<?xml version="1.0"?>
    <autogen>__KeyToKey__ KeyCode::S, VK_CONTROL, VK_OPTION, VK_COMMAND | ModifierFlag::NONE, KeyCode::VK_CONSUMERKEY_EJECT, ModifierFlag::OPTION_L | ModifierFlag::COMMAND_L</autogen>

Or create a workflow like this in Alfred:

share|improve this answer
Yep, this is nice. Keeping it uniform across all Macs :) – gentmatt Dec 7 '12 at 14:19

Press the power button. Assuming you haven't reconfigured its behaviour, it should pop up a dialog with options to Sleep, Restart, or Shutdown the laptop. The "Reopen windows when logging back in" checkbox has keyboard focus by default; hitting the Tab key twice will put focus on the Sleep button - hitting the Space bar will then put the MacBook Air to sleep.

(Note that hitting Return will activate the dialog's default action - namely, to shut the computer down.)

Not as quick as a single keyboard shortcut, but faster than the mouse and without closing the lid. :)

share|improve this answer
Thank you for mentioning that spacebar triggers the focused button. That was not obvious to me at all. – ryanman Oct 18 '11 at 15:29
How do you change the behavior of the power button in Lion? (2011-11-14) notes that for some users, simply pressing the power button will sleep the Mac without a dialogue. – Graham Perrin Aug 5 '13 at 9:48
up vote 7 down vote accepted

Press the power button, then S.

As described in this thread:

The power button displays the Sleep/Restart/Shutdown dialog. If you then press S the Mac will sleep.

share|improve this answer
Nice! Two fewer keystrokes than my solution. :) – Dan J Oct 18 '11 at 16:00
I would like to figure out if there is some rhyme or reason to the 'S' key activating the Sleep button. I wonder if there a consistent convention for which letters activate which buttons in osx. – ryanman Oct 18 '11 at 16:05

You can assign any unused key combination (like fnF12) using System Preferences » Keyboard » Keyboard Shortcuts » Application Shortcuts Click the + button, then under Application, leave All Applications, under Menu Title enter Sleep, and under Keyboard Shortcut, press fnF12.

enter image description here

Another option, if you're more Terminal-inclined:

  • space
  • Type Terminal
  • push Enter
  • Type sudo shutdown -s now
share|improve this answer

Keyboard shortcut is Option+Cmd+Eject (the Eject key is at your keyboard upper right corner).

share|improve this answer
Not on the new MacBook Air models. No eject key. – Daniel Oct 18 '11 at 2:30
The power key can be substituted for eject on Mountain Lion and later versions of OS X. It works for other shortcuts like ⌃⇧⏏ as well. – user495470 Aug 29 '12 at 5:33

Keyboard Shortcut

enter image description here

Sleep Mac while it is running

enter image description here

share|improve this answer
This just turns off the display on older Macs. On the newer Macs this is the same as sleep, as far as I understand, but it might confuse people with older machines. – Arne Aug 26 '14 at 11:10

For everyone without a mac keyboard, I advice you to install Karabiner.

Once opened, you can go under "Change Key" tab and search for sleep:

enter image description here

With this option checked, now you can:

  • prompt restart/sleep/shutdown dialog: CtrlAltDel
  • force immediately sleep: ShiftCtrlAltDel
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.