Black Friday 76% off Levers, until 5 December
More apps from us

Guide

How to turn on Dark Mode with a keyboard shortcut on a Mac

Atta 🐬

Maker of Levers

Updated

Quick answer

Open System Settings › Appearance and choose Dark, Light or Auto. macOS has no keyboard shortcut for Dark Mode, but you can make one: in the Shortcuts app, make a shortcut with the Set Appearance action set to Toggle, open its Shortcut Details and click Add Keyboard Shortcut. Press those keys in any app to switch between light and dark.

Levers switches Dark Mode with one click in the menu bar, or with a hotkey you choose.

How to make a keyboard shortcut for Dark Mode

  1. 1

    Open the Shortcuts app from Applications and choose File › New Shortcut.

  2. 2

    Search the actions for Set Appearance and double-click it to add it.

  3. 3

    Set the action’s first choice to Toggle, so the shortcut switches to whichever look is off. Give the shortcut a name, such as Toggle Dark Mode.

  4. 4

    Click Shortcut Details, then Add Keyboard Shortcut, and press the keys you want, such as Control-Option-Command-D.

  5. 5

    Press the keys in any app. The whole Mac switches between light and dark.

Pick keys no app uses. Some key combinations are kept for macOS and can’t be used. To remove the shortcut later, click the Run with field in Shortcut Details and press Delete.

Dark Mode turns the windows, menus, Dock and built-in apps dark. You set it in System Settings, and Control Center has a button for it, but there’s no key for it out of the box. The Shortcuts app is the free way to give it one. The table shows each way to switch.

Ways to switch Dark Mode on a Mac

WayFrom the keyboardSteps each timeNeeds setting up
System Settings › Appearance No Three or four clicks No
Control Center › Display No Three clicks No
Shortcuts app with a keyboard shortcut Yes One key press Once
Terminal No One command No
Levers Yes One click or a hotkey Once, to allow it

Yes Partly No

How to turn on Dark Mode on a Mac

Choose Apple menu › System Settings, then click Appearance in the sidebar. Next to Appearance, choose Light, Dark or Auto. The change is immediate, in every app.

For a quicker way with the mouse, click Control Center in the menu bar, click Display, and click Dark Mode.

What does Auto do?

Auto switches the Mac from light to dark on the Night Shift schedule, if you’ve set one, or at sunset and sunrise if you haven’t. It waits until the Mac has been idle for at least a minute, so it doesn’t change while you’re using it.

If you’d rather decide yourself, choose Light or Dark and switch with a keyboard shortcut.

How to switch Dark Mode from Terminal

System Events can set the appearance from Terminal. The first command switches to whichever look is off; the second sets dark, and with false in place of true, light. The first time, macOS asks to let Terminal control System Events: click OK.

To check which look is on, the third command prints Dark in Dark Mode, and an error in Light.

osascript -e 'tell application "System Events" to tell appearance preferences to set dark mode to not dark mode'
osascript -e 'tell application "System Events" to tell appearance preferences to set dark mode to true'
defaults read -g AppleInterfaceStyle

The same AppleScript works in a Run AppleScript action in the Shortcuts app, or in any app that runs scripts from a keyboard shortcut.

Why doesn’t my Dark Mode keyboard shortcut work?

Check these, in order:

  • Another app uses the same keys. The app in front gets them first. Pick a combination with three modifier keys, such as Control-Option-Command, which apps rarely take.
  • The keys are kept for macOS. Some combinations can’t be given to a shortcut. Choose others in Shortcut Details.
  • The action is set to Turn, not Toggle. Turn sets one look every time, so pressing the keys again changes nothing.

Other ways to run the shortcut

A shortcut you made can also sit in the menu bar: in Shortcut Details, turn on Pin in Menu Bar. The Shortcuts app has a Set Night Shift action as well, if you want a key for the warmer evening colors.

Or switch it with one click in Levers

We make Levers.

Levers sits in your menu bar with a Dark Mode switch among its others. Click it to go dark, click again to go light. Give it a hotkey in Settings › Shortcuts and it works from any app, without making a shortcut first.

  • Dark Mode
  • One click in the menu bar, or a hotkey of your own
  • Turn Off After: back to light in 15 minutes, an hour, or tomorrow morning
  • A step in a mode, so Dark Mode comes on with your other settings for a call or for the evening

Good to know

  • Levers switches between Light and Dark. It doesn’t choose Auto; that stays in System Settings › Appearance. The first time, macOS asks to let Levers control System Events.
  • Needs macOS 15 Sequoia or later.
  • One payment, no subscription, with a 14-day refund.

Questions people ask

Is there a keyboard shortcut for Dark Mode on a Mac?

Not out of the box. You can make one in the Shortcuts app: a shortcut with the Set Appearance action set to Toggle, then Add Keyboard Shortcut in its Shortcut Details.

How do I turn on Dark Mode on a Mac?

Choose Apple menu › System Settings, click Appearance, and choose Dark. Or click Control Center in the menu bar, click Display, and click Dark Mode.

Why does my Mac switch between light and dark by itself?

Appearance is set to Auto, which follows the Night Shift schedule, or sunrise and sunset if there’s no schedule. Choose Light or Dark in System Settings › Appearance to keep the one you pick.

Can I turn on Dark Mode from Terminal?

Yes. Run osascript -e 'tell application "System Events" to tell appearance preferences to set dark mode to true', or false for light. macOS asks once to let Terminal control System Events.

Is there an app that switches Dark Mode with one click?

Yes. Levers puts a Dark Mode switch in your menu bar: one click goes dark, another goes light, and you can give it a hotkey that works in any app. It costs from $6.99, paid once.

More guides