I'd like a shortcut that makes the screen go to a black screen immediately, without turning any power off, or even putting it to sleep.
What ways can I do that?
How more efficient the solution is to set up, the better.
Super User is a question and answer site for computer enthusiasts and power users. It only takes a minute to sign up.
Sign up to join this communityI'd like a shortcut that makes the screen go to a black screen immediately, without turning any power off, or even putting it to sleep.
What ways can I do that?
How more efficient the solution is to set up, the better.
You can just make a shortcut to the blank screensaver and then set a keyboard shortcut via the properties window for the shortcut.
The screensaver is called scrnsave.scr
, located in %SYSTEMROOT%\system32
.
.scr
extension for itself (Eagle does this, annoyingly), and also doesn't work in cases where the screensaver doesn't show by default (it is not required to do so by Microsoft's specification). The solution I found for Windows 10 is to link directly to: cmd /c scrnsave.scr /s
Oct 25, 2017 at 22:27
You can easily do this with NirCmd, these four options will give you a black screen each (with side effect):
Turn off the monitor.
nircmd.exe monitor off
Start the default screen saver (set it to a blank one, so you can make the screen blank).
nircmd.exe screensaver
Put your computer in 'standby' mode.
nircmd.exe standby
Turn off your computer.
nircmd.exe exitwin poweroff
Make sure that you have nircmd.exe
in C:\Windows\System32
if you want to call it from anywhere.
As Dennis Williamson pointed out in his comment, you can create a hotkey like this:
nircmd.exe cmdshortcutkey "C:\Windows\Temp" "MO" "Ctrl+Shift+M" monitor off
Or a shortcut on your desktop which you can click like this:
nircmd.exe cmdshortcut "~$folder.desktop$" "Turn Monitor off" monitor off
With AutoHotkey, you can bind any of the above commands to a hotkey:
#s::Run nircmd.exe monitor off
The above hotkey WIN+S would for example turn the monitor off.
An alternative program, if you dislike scripting, could be PhaseExpress.
nircmd.exe cmdshortcutkey "c:\temp" "Turn Monitor Off" "Ctrl+Shift+M" monitor off
Feb 19, 2011 at 16:49
Set your screensaver to the one called "blank". Press Win-L.
Here are some examples of using AutoHotkey to turn off the monitor or start the screen saver without needing NirCmd.
Win
key -- represented by #
at the beginning. The macro can still output one, for example ^o::SendInput #l
makes CTRL-o
do what Win-L
does.
Feb 19, 2011 at 19:13
SendMessage, 0x112, 0xF140, 0,, Program Manager
- I just tried it with "blank" as my screen saver and it works.
Feb 19, 2011 at 23:03
0xF170
which is SC_MONITORPOWER
, not the one before that you referred to which uses 0xF140
for SC_SCREENSAVE
as the second SendMessage
argument.
Feb 20, 2011 at 2:07
WM_SYSCOMMAND
messages and their hex values.
Feb 20, 2011 at 2:20
I used NirCmd to create a task in Win7 task scheduler, that turns the monitor off when I lock the computer (Ctrl+L)
In the Actions, paste: nircmd.exe
and in Arguments put monitor off
.
Then use the drop-down in Triggers to choose "Workstation is locked". Works like a charm.
There is a built-in function on my laptop. Just hit the Fn+F6. This toggles the black screen on my laptop, anyway: no extra command programming required.
Another option using AutoHotkey:
SendMessage 0x112, 0xF170, 2,,Program Manager
You need to install AutoHotkey (1.1.x, not sure if it works in 2.x), create a text file with .ahk extension (e.g. turn_off_screen.ahk
), paste this line there using any text editor, and you can run it by double click.
Fn+F2 does it quickly and simply for me (while NOT running PowerPoint or any other program, or hooked up to any other screen or device). Repeat the step to unblank.
If you want to blank just one display, without disabling or "sleeping" it you can use this VB6 program that simply loads a black background HTML file in full screen without any boarders:
http://jpelectron.com/download/viewit-rev3.zip
Copy all the files to: C:\Program Files (x86)\viewIT\ then run or make a shortcut to viewit.exe
There is also the option to make the entire screen white (like a flashlight app)
I created this because I needed a way to blank my tablet's screen (primary display) while I had a YouTube or other video playing full-screen elsewhere (secondary display)
If you don't like that this loads on the primary display only, I would suggest you open fillblack.htm in a browser, put that browser on the display you want, then press F11 to enable full-screen/kiosk mode - that will do it too.
Another useful tool for this purpose is Multiscreen Blank. You will still need to set up a system-wide shortcut with an additional tool, but the screen blanking settings are nicely adjustable.
The accepted answer by Candreasen on May 31 '13 at 3:56 was spot on.
Some additional information based on my implementation in Windows 7:
Create a shortcut with the following target:
C:\Windows\System32\scrnsave.scr
This blanks both screens when another display is connected to the HDMI port on my laptop.
This invokes the 'blank' screensaver.
I think any .scr screensaver file in the Windows folders can be started this way.
Unlike the automatic starting of a screensaver after inactivity on this machine, this invocation of the screensaver does not request a password when it restarts.
According to this, it seems to be normal for a screensaver invoked in this way not to be locked:
https://msdn.microsoft.com/en-us/library/ms686421(v=vs.85).aspx#ss_keys
"Before a screensaver appears, Windows creates a new virtual desktop for it. The screensaver process is created on this second desktop, which is never locked."
I am surprised that this simple yet important function is not built in to Windows 10. I am currently using ScreenOff to accomplish this screen blanking effect. Not good.
to Avoid the sleeping mode save this script as a .vbs format and double click just once. Approximate 1 hour you screen will not go in sleeping mode. how its work: its keeps refreshing your PC for 1 hour . safe and secure . :D
set sh=createobject("wscript.shell")
for i=1 to 25
WScript.sleep 120000
sh.sendkeys"{F15}"
next
set sh=nothing
Step 1:
copy it and put this in your note pad
step 2:
while saving save it with .VBS ext. EX: ABCDEF.vbs
Step 3:
after that just double click on it once.
There is a regular standalone portable Don'tSleep utility from softwareok.com which allows to define which applications would be barred from forcing your PC or screen from sleeping.
I just need a blank screen so I can output a messsage, which would otherwise appears on regular desktop and not be quite legible, prompting the user to do something. I think "viewit" solution should work for me.