How to switch between Light and Dark mode with shortcut on Windows 10
Sometimes, you may need to switch from light mode to dark mode or vice versa from time to time according to your needs. There isn’t a specific shortcut for it on Windows 10 and you have to enable/ disable it by going to Settings App > Personalisation > Colors > Choose your color> Dark/ Light. Now who wants to go through these steps when you can switch between dark mode and light mode using a custom shortcut key.
For me, I have made a shortcut key Ctrl + Alt + L to switch to Light mode and Ctrl + Alt + D to switch to Dark mode and in this article, I will be showing you how to create these shortcuts and run them whenever you need.
The following things are required in order to create such shortcut: Task scheduler and create shortcut.
Follow below steps in Task Scheduler:
Press the windows button on your keyboard, and start typing Task in the open space. Under Apps, you will see Task Scheduler, click on it.
In the Task Scheduler main window, on the left pane, click on Task Scheduler Library. Next, on the right side pane under Actions, click on Create Task…
Create Task window will be up.
Under General tab, type name and a description in fields, e.g. Name: switch_dark and Description: this will switch from dark to light. Under Security options section, tick Run only when user is logged on and Run with highest privileges options.
Under Actions tab, click New button. In Edit Action window, select Start a program under Action drop-down. Under Program/script field, type
%SystemRoot%\system32\WindowsPowerShell\v1.0\powershell.exe
and under Add arguments(optional) field, type
New-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Themes\Personalize -Name SystemUsesLightTheme -Value 1 -Type Dword -Force; New-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Themes\Personalize -Name AppsUseLightTheme -Value 1 -Type Dword -Force
and click OK.
Under Conditions tab, untick every option but if you are on your laptop and care about the battery usage then you may tick the option Start the task only if the computer is on AC power under Power section.
Under Settings tab, tick the following options only, Allow task to be run on demand, If the running task does not end when requested, force it to stop and click OK.
You might be prompted to enter your local account password in order to create it. If you have forgotten your password, you can reset it if you have logged in as administrator using your PIN by simply opening Command Prompt (right-click on Windows button on taskbar and click Command Prompt (Admin)) and typing net user <username> set <password> and press enter key.
Similarly, you will have to create another task to switch from light to dark.
Follow the above steps again, create another task, name it switch_light and put description as switches from light to Dark and keep every other setting as it is but instead in Edit Task windows under Actions tab, type
%SystemRoot%\system32\WindowsPowerShell\v1.0\powershell.exe
under Program/script field and type
New-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Themes\Personalize -Name SystemUsesLightTheme -Value 0 -Type Dword -Force; New-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Themes\Personalize -Name AppsUseLightTheme -Value 0 -Type Dword -Force
in Add Arguments field.
Now, we have created two tasks with names, switch_dark and switch_light. We are going to need these names in next step to create shortcuts.
On your desktop or any other folder, right-click with your mouse on open space, click New and select Shortcut.
Create Shortcut windows will pop up and under Type the location of the item, type C:\Windows\System32\schtasks.exe /run /tn “switch_light” and click Next to continue. Remember to keep the double quotes in the location or otherwise it will not work.
Under Type a name for this shortcut, any name you want, e.g. Switch To Dark Mode and click Finish to create the shortcut.
Your shortcut is now created and is on the Desktop or the folder.
Right-click on the shortcut with your mouse and select Properties.
Shortcut’s properties window will get displayed. Now, under Shortcut tab, select a shortcut key combination of your choice under Shortcut key field.
Similarly, do the above process of creating another shortcut for another task ‘switch_dark’. Instead of typing C:\Windows\System32\schtasks.exe /run /tn “switch_light”, type C:\Windows\System32\schtasks.exe /run /tn “switch_dark”. Remember to keep the double quotes in the location or otherwise it will not work.
The combinations will work on any window. This way you can switch between modes without going into Settings app.
If this article helped you, give a thumbs up.