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 OS X v10.8 (Mountain Lion) and newer versions of OS X.
Other keyboard shortcuts:
- ⌃⌘ 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.
Keyboard shortcut for powering down MacBook Pro with Touch Bar? - Ask Different
How to set up a keyboard shortcut for "Shut Down..."? | MacRumors Forums
What is "shutdown your mac" keyboard shor… - Apple Community
What is the keyboard shortcut for sleep, restart, shut down, or choose option ( out of those three), now that Eject button has been replaced by Touch ID?
Videos
I've read in numerous places that it's possible to shut down your Mac by holding down Ctrl/Option/Cmd and the power button. However, for me, it just signs me out.
Does this shortcut no longer work or is it only certain devices?
I have a MacBook Pro 13 with Touch Bar and running Ventura 13.1
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 OS X v10.8 (Mountain Lion) and newer versions of OS X.
Other keyboard shortcuts:
- ⌃⌘ 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.
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.
In System Preferences → Mission Control
- Change "Show Desktop" to F10
- Change "Show Dashboard" to F11
In System Preferences → Keyboard, open App Shortcuts.
- Click + to add a new shortcut.
- Leave Application as "All Applications".
- In Menu Title enter exactly this phrase (without quotation marks): "Shut Down…"
- Click cursor in the Keyboard shortcut field, then on keyboard hold "fn" key then select "F12" on Touch Bar
- Holding "fn" key and selecting "F12" on Touch Bar will bring up the shutdown prompt.
- Holding "fn" key and selecting "F10" will show desktop, holding "F11" will show dashboard.
"Have you tried using TOUCH ID as a substitute for Power Button in the regular shortcuts?"
holding down Touch ID will power off the computer, but it's a hard poweroff similar to holding down the power button on older machines for 5 seconds. I also can find no method for using the keyboard to initiate a normal shutdown. Bizarrely, the TouchBar has a sleep command that can be configured (see the bit about customize and expand here), but using modifier keys with the Touchbar sleep command like cmd or cmd-opt or cmd-opt-ctr will launch into the Energy Saver pane in System Preferences rather than sleep, restart or shut down..weird. Hopefully they'll add/fix this in a future software update. This is a BIG drawback for me as well in the new machine :(