2

Can I shut down my mac with the keyboard only?

I dont want to force shut down (like holding the power key), I want to shut it down normally.

1

4 Answers 4

3

If you have a keyboard with an eject key, you can use ⌃⌥⌘⏏ (control-option-command-eject).

If you have a laptop with a power key in place of an eject key, the power key can be substituted for eject in 10.8 and newer versions of OS X.

Other keyboard shorcuts:

  • ⌃⌘⏏ restarts the computer
  • ⌥⌘⏏ puts the computer to sleep
  • ⌃⇧⏏ puts displays to sleep
  • ⌃⏏ opens the dialog shown when pressing a power button or power key
  • ⇧⌘Q logs out after showing a confirmation dialog
  • ⌥⇧⌘Q logs out without showing a confirmation dialog

My keyboard doesn't have an eject or power key, so I normally use Alfred:

You could also assign a keyboard shortcut to a script like this:

tell app "System Events" to shut down

The shut down command sends loginwindow a kAEShutDown Apple event, which starts a normal shut down sequence as described in the Daemons and Services Programming Guide. sudo shutdown -h now does not for example allow graphical applications to ask for confirmation if there are unsaved changes.

7

Well, while it's not "keyboard only" per se, you can open up a terminal and type in sudo shutdown -h now, which will send a signal to the kernel to shutdown the computer.

I'm not sure if that was exactly what you were looking for, but it should be a viable solution.

Apparently, another option is to use Command-Option-Control-Media Eject key, which will quit all applications and let you save documents/work and then shuts down the mac.

1
  • How isn't this keyboard only? Because you need to open Terminal? Cmd-Space to open Spotlight search, type Terminal, press Return.
    – Daniel Beck
    Oct 16, 2013 at 18:36
1

Open Keyboard Shortcuts in System Preferences. Click on Applications Shortcuts in the list at left.

Click on the "plus" sign and choose "All Applications" in the pulldown menu. Type in "Shut Down" (WITHOUT the ellipses you'd find after this command in the Apple Menu) and choose whatever keyboard shortcut you want.

(I typically put SHIFT-OPT-COMMAND in front of all of my shortcuts so it's harder to hit them by accident.)a

Restart your Mac and your new command should show up in the Apple Menu below the normal "Shut Down…" command, along with its new keyboard shortcut.

p.s. you can use this for Sleep and Restart, too.

0
  1. Press CtrlF2 to keyboard-focus the menu bar
  2. Press Return to open the  menu
  3. Press twice to navigate to the Shutdown… item
  4. Press OptionReturn to shutdown without additional confirmation dialog

This will work unless you changed the keyboard shortcut to access the menu bar in System Preferences » Keyboard » Keyboard Shortcuts » Keyboard & Text Input.

You must log in to answer this question.

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