Stop the Power Button From Turning Off the Mac Display in OS X Mavericks

Apr 9, 2014 - 13 Comments

MacBook Pro and MacBook AIr power button on the keyboard

The Power button on newer MacBook Air and MacBook Pro models has been turned into a button on the actual keyboard, located directly above the Delete key. For the most part, this isn’t an issue, but with the introduction of OS X Mavericks, tapping on that Power button no longer prompts the Sleep / Restart / Shut Down dialog, and instead it now instantly turns the screen off, which can lock the screen if you have a wake password set.

For some MacBook Air/Pro users, that behavior change means that accidentally hitting the Power button is much more intrusive than it was before. If you’re one of the users who accidentally strikes the Power button instead of the Delete key from time to time (since they’re quite close to each other depending on your keyboard), you’ll be relieved to discover that you can change the behavior of the Power key in OS X with the help of a defaults write command. Like any other defaults command string, the change is easily reversible if you decide you don’t like how the behavior adjusts, so we’ll show you how to do both.

You’ll need OS X version 10.9 or newer to have this command string work.

Change the Mac Power Button Behavior in OS X Mavericks

Launch the Terminal, found within the Applications > Utilities folder of the Mac, and enter the exact command as shown below:

defaults write com.apple.loginwindow PowerButtonSleepsSystem -bool no

Hit the Return key to execute the defaults command string, changes will take effect immediately.

With this turned off, you’ll need to hold the power button for a second or two to trigger the pre-10.9 action of summoning the Sleep, Reboot, and Shut Down options.

Power button on a MacBook Air

Return to the Default Mac Power Button Behavior in OS X

To return to the (new) default setting of having the Power button key sleep the Mac display, use the following defaults command string instead:

defaults write com.apple.loginwindow PowerButtonSleepsSystem -bool yes

You’ll notice the only change is the “yes” versus “no” syntax attached to the -bool flag, as is commonly the case with reversing other defaults command strings. Again, changes take effect immediately, and you’ll be back to the Power key behavior in Mavericks, meaning instant screen sleeping when the button is tapped.

I discovered this over at MacWorld after looking for a solution for repeatedly accidentally initiating display sleep on an 11″ MacBook Air, if you’re frustrated with the same thing, give this a try.

.

Related articles:

Posted by: Paul Horowitz in Mac OS, Tips & Tricks

13 Comments

» Comments RSS Feed

  1. david says:

    dude I love you tysm!!!!!

  2. voxel says:

    Thanks, this helped me end of the tyranny of my two year old son’s favourite game of turning off daddy’s computer as he runs past the desk. I’m sure he’ll find something worse to do though

  3. Benjamin D. says:

    FYI: This still works in Yosemite! :D

    (I did a clean install of OS X 10.10 Yo and it reverted the power button back to immediate sleep.)

  4. Tristan says:

    Thanks a lot, notice it only works from 10.9.2 or 10.9.3
    I’ve just updated it since it din’t work instantly, or maybe restarting the OS makes it working.

  5. clivex says:

    In Mavericks, press ctrl and the power button (or on the wireless keyboard ctrl and eject) and it brings up the shutdown dialog.

  6. Cl@ud says:

    Tap the power button once put your Mac to sleep and not only instantly turns the screen off :(

    http://support.apple.com/kb/HT5869

  7. benji888 says:

    I agree with Ted, there is a delay, however, this delay was not present with OS X 10.9.1, this is a new “feature” found in the 10.9.2 release, and the fix also has the same delay bringing up the menu.

    I can attest this fix works on my mid-2010 MacBook Pro 13″, which has an “eject” button where the newer models have the power button, a seriously cheap move on Apple’s part, as mine has the power button over in the aluminum area up and away from the keyboard.

    *ONE NOTE: where I found this fix, they stated it only works specifically with 10.9.2…have you tested it with 10.9.1? (here: http://forums.macrumors.com/showthread.php?t=1602151&page=3)

    • benji888 says:

      (wish I could edit)… …Even with the power button away from the keyboard, and, even with the new delay, I do prefer it bring up the menu instead of making the mac go right to sleep.

      • vdiv says:

        Agree, my mid-2010 MBP 15″ also has a dedicated power button that I like. Now I do not have to press and hold it to bring up the shutdown menu, it comes up immediately after pressing the power button.

        Using the power button to put the system to sleep was unnecessary anyway as closing the lid does the same thing.

  8. Ted says:

    Great tip! However, I have to mention that I have one of the late 2013 MacBook Pros and on it you have to HOLD the power button for at least more than (…what I gather) at least half a second to shut the monitor off. So even if you a bad typer, chances are you don’t spend half a second or more on a key and such, the monitor won’t shut off just because you accidentally hit the power key – which I did a few times, but the monitor never shut off since you have to hold it just a tad longer to activate it.

    • Q. Vankenheim says:

      This must be a recent change (10.9.2?) because on my MacBook Air (2012) I would accidentally hit it and it would turn off the display with a tap. Now I have to hold it down to trigger the screen sleep function and the ‘tap’ does nothing unless it’s held for a moment.

      Interesting to note that it’s different from 10.9, 10.9.1, and 10.9.2. The latter being the best option, IMO.

      SO anyway in 10.9.2 give a longer press to turn off the display. Or if you use this defaults command, the longer press brings up the dialog window. The article is accurate but should mention that with OS X 10.9.2 the Power button is much less sensitive.

Leave a Reply

 

Shop on Amazon.com and help support OSXDaily!

Subscribe to OSXDaily

Subscribe to RSS Subscribe to Twitter Feed Follow on Facebook Subscribe to eMail Updates

Tips & Tricks

News

iPhone / iPad

Mac

Troubleshooting

Shop on Amazon to help support this site