How can I make my screen blank by a shortcut?

24

11

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.

barlop

Posted 2011-02-19T15:55:24.587

Reputation: 18 677

Alternatively you can create a black background fullscreen app and place a shortcut on the taskbar. Also you can set the desktop background to solid black color, hide all items on the desktop and enable taskbar auto-hiding. Then just press Win+D and voila. – user1306322 – 2013-12-30T13:58:53.527

Answers

15

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.

Candreasen

Posted 2011-02-19T15:55:24.587

Reputation: 166

1Nice simple solution. – user237209 – 2015-12-04T04:00:43.693

1This solution is neat, but broken for cases where another application has hijacked the .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 – Polynomial – 2017-10-25T22:27:46.610

15

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.

Tamara Wijsman

Posted 2011-02-19T15:55:24.587

Reputation: 54 163

hmm, can you include how to do this automatically with a keyboard shortcut? if you're familiar with whatever software does it – barlop – 2011-02-19T16:23:31.960

1

@barlop: From the examples nircmd.exe cmdshortcutkey "c:\temp" "Turn Monitor Off" "Ctrl+Shift+M" monitor off

– Paused until further notice. – 2011-02-19T16:49:17.740

@DennisWilliamson: Oh, didn't see that. Updating answer a second time... – Tamara Wijsman – 2011-02-19T16:51:08.140

@Dennis Williamson That just creates a lnk file for it. doesn't run the lnk file on a shortcut – barlop – 2011-02-19T17:16:06.887

@TomWij That line you mentioned almost does it, but I just amended the nircmd.exe to the full path of it, then it works. – barlop – 2011-02-19T17:18:12.063

@TomWij i'm using the #s suggestion. The command nircmd.exe cmdshortcutkey "C:\Windows\Temp" "MO" "Ctrl+Shift+M" monitor off Doesn't create a hotkey It just creates a lnk file in that temp directory called MO.lnk ctrl-shift-m doesn't turn the monitor off. – barlop – 2011-02-19T17:36:43.687

@barlop: I added the System32 suggestion for your first comment; as for the second comment it does set the hotkey for that file to Ctrl+Shift+M, but it seems that this hotkey would only function if you have the shortcut on your background. I also got confused whether you meant a "shortcut file" or "shortcut keys" in your question. But well, glad one of the suggestions worked for you... :-) – Tamara Wijsman – 2011-02-19T17:41:53.297

1@TomWij you're right. This suggestion put together based on dennis's comment and your line and comment, works too C:\nircmd>nircmd cmdshortcutkey "~$folder.desktop$" "TMO2" "Ctrl+Shift+M" monito r off Then the keyboard shortcut works – barlop – 2011-02-19T18:07:28.363

windows native keyboard shortcuts seem a bit limited since they only work for items a)on the desktop or b)on the start menu. . i'm not even sure how to list them all.. – barlop – 2011-02-20T09:24:33.060

@barlop: Well, you could use AutoHotkey. But it seems you have been helped in Dennis' comments... :-) – Tamara Wijsman – 2011-02-20T14:02:58.253

@TomWij I'm aware of that – barlop – 2011-02-20T14:43:05.050

6

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.

Paused until further notice.

Posted 2011-02-19T15:55:24.587

Reputation: 86 075

I just tried Win-L and it gave a welcome screen. I like that solution but it'd also be nice to have a more generic solution that'd work for computers with keyboards without a windows key. – barlop – 2011-02-19T16:08:22.133

@barlop: You could probably do something with AutoHotkey. – Paused until further notice. – 2011-02-19T16:09:40.393

You can do the equivalent without the Win key with the following key sequence: CTRL+ALT+DELETE, ALT-u, then k. Alternatively you could use AutoHotKey to make a macro that just does a SendInput #l. (Note the last character is a lowercase "L".) – martineau – 2011-02-19T18:14:32.703

@martineau I think that does the same as Dennis's suggestion, and is equivalent to windows key with l(el), and brings the welcome screen not a blank screen – barlop – 2011-02-19T18:26:58.277

@martineau I just tried adding this to autohotkey.ahk #o::SendInput #l and then windows key with o, did the same as windows key with l(el). – barlop – 2011-02-19T18:28:00.057

@barlop: But that answers this request: "a more generic solution that'd work for computers with keyboards without a windows key." – Paused until further notice. – 2011-02-19T18:39:23.657

@Dennis Williamson what answers it? – barlop – 2011-02-19T18:54:00.267

@barlop: martineau's comment: "Alternatively you could use AutoHotKey to make a macro that just does a SendInput #l" – Paused until further notice. – 2011-02-19T19:03:05.603

I was just trying to provide "generic solutions" for computers without a Windows key (since you said you liked the welcome screen). – martineau – 2011-02-19T19:08:47.483

1@barlop: Just make you AHK macro be a key combination that isn't triggered by something involving the 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. – martineau – 2011-02-19T19:13:40.440

@martineau ah now you mention ^o, that sorts it, I am not that familiar with autohotkey, telling it to use ctrl for the hotkey, so now you mention the actual line ^o::... ctrl-o. So i'm using ^s::Run c:\nircmd\nircmd.exe monitor off – barlop – 2011-02-19T22:29:14.673

@barlop: Sounds like you're beginning to understanding -- except for the fact that if you're using AHK, you don't also need NirCmd, SendInput is a built-in AHK function and can do all that is required. – martineau – 2011-02-19T22:35:14.630

@martineau I want a blank/black screen not a welcome screen. I don't know what sendinput line would do that? – barlop – 2011-02-19T22:54:04.773

1@barlop: In the AHK page I linked to in my answer: SendMessage, 0x112, 0xF140, 0,, Program Manager - I just tried it with "blank" as my screen saver and it works. – Paused until further notice. – 2011-02-19T23:03:39.420

@Dennis Williamson ah, I didn't see that.. – barlop – 2011-02-20T00:11:35.000

@Dennis Williamson, @barlop: The SendMessage, 0x112, ... will blank your screen regardless of what, if any, screensaver is set. It turns the video output signal from your graphics card to your monitor(s) off. – martineau – 2011-02-20T01:27:46.067

@martineau: OK, but that's not what the AHK page says. "Start the user's chosen screen saver:" and "0x112 is WM_SYSCOMMAND, and 0xF140 is SC_SCREENSAVE."

– Paused until further notice. – 2011-02-20T01:37:41.000

P.S. To my last comment about SendMessage, note also that you should proceed it with a Sleep 1000 to give the user time (1 sec) to release the triggering hot keys, otherwise releasing them can wake up graphics system back up. – martineau – 2011-02-20T01:41:59.530

@Dennis Williamson: That's not what the AHK page says, but that's what it does, I just verified it. This has been a permanent AHK macro on all my systems for quite some time. I heard about it in a lifehacker article titled PushMonitOff Links Hot Key Combo to Monitor Power Switch.

– martineau – 2011-02-20T01:57:40.073

1@Dennis Williamson: Ah, ha! I just caught the difference. I'm using 0xF170 which is SC_MONITORPOWER, not the one before that you referred to which uses 0xF140 for SC_SCREENSAVE as the second SendMessage argument. – martineau – 2011-02-20T02:07:36.520

1

For anyone interested this Microsoft page lists the various WM_SYSCOMMAND messages and their hex values.

– martineau – 2011-02-20T02:20:12.137

1

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.

Cherryaa

Posted 2011-02-19T15:55:24.587

Reputation: 11

1

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.

Klinkehoffen

Posted 2011-02-19T15:55:24.587

Reputation: 11

1That only works on a limited number of laptops. But OP didn't specify what device he wants this on, so I guess your answer is ok. – user1306322 – 2013-12-30T09:23:22.740

@user1306322 given that there are at least hundreds of popular laptops out there, and the probability of it that function making a scree blank is very low.. the specific is not that useful. But the general idea that maybe the laptop has a functio to blank the screen is ok.Perhaps if the answerer showed a screenshot of the picture that blanks the screen, that'd be good.My Fn+F6 key is volume.But if he shows a screenshot then wherever it is if I have that pic I could look. And user, even if I don't have it, somebody else with the same question might(this site isn't for just the 1 questioner) – barlop – 2013-12-30T11:06:18.190

@barlop well then, the next person to ask should specify their PC type and model, which you, by the way, forgot to do. Otherwise, please, add that you're looking for solutions that could suit multiple PC types. – user1306322 – 2013-12-30T12:13:45.640

@user1306322 this site rejects questions that are too "localized". (and in this case i'd agree with that rule). Questions have to be useful to people. It's not so useful to many people if a question just answers for one particular model of laptop. Or even if people answer regarding 10 models. The chances of any reader having one of those 10 models is slim. They can also (sometimes stupidly I think), reject questions for being too general. I wouldn't make it so explicitly general as to provoke a dumb closure. But sure a Windows solution is general enough to suit different laptop models... – barlop – 2013-12-30T13:19:24.787

and yeah if he includes a picture that works. It's just about giving sensible answers. I can't make a question completely idiot proof from everybody. But the question as it stands is concise and clear and anybody that understands the absolutely sane sensible good rule that the site has, would not answer about specific models and would not encourage answering re specific models. those answers would be downvoted for not being useful. Remember, questions and answers should be useful to not just the person asking. This site is first and foremost a database of QnA. – barlop – 2013-12-30T13:23:18.317

in theory, there could be tags for specific laptop models but the site isn't for that.. if they did that then there would be a swamp of questions and answers of no use to most people, on the one main page. A forum like notebook forum is better for that as at least they have subsections for laptop makes. And by the way, I did ask about a shortcut in the title, that is OS, so would be laptop model independent. Though i'm fine with a solution that maybe 10%+ of laptops have. A lower % and it definitely wouldn't be suitable for the site. – barlop – 2013-12-30T13:26:02.500

IMO the question in its current form is unacceptably broad. But whatever. If you have your answer − good for you. If other people can find their answer too, although it's the wrong question and they're looking in the wrong place − fine. But if you really want to play by the rules, you should provide more details about the solution, like if it has to only use the built-in OS features or can rely on third-party software. Otherwise you're not asking a very specific question to which people give all kinds of answers that may not solve the described problem (in which case they're wrong answers). – user1306322 – 2013-12-30T13:48:03.430

let us continue this discussion in chat

– barlop – 2013-12-30T14:04:39.960

0

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.

user85398

Posted 2011-02-19T15:55:24.587

Reputation: 9

When recommending software, follow this outline please.

– Kamil Maciorowski – 2018-02-16T17:16:15.607

0

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.

AlexP11223

Posted 2011-02-19T15:55:24.587

Reputation: 167

0

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.

user337575

Posted 2011-02-19T15:55:24.587

Reputation: 1

This is device-dependent and no general solution. – Jens Erat – 2014-06-22T12:11:33.880

0

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.

notAduck

Posted 2011-02-19T15:55:24.587

Reputation: 11

0

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.

JoshRivers

Posted 2011-02-19T15:55:24.587

Reputation: 1 022

0

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."

Sam

Posted 2011-02-19T15:55:24.587

Reputation: 1

-1

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.

user38660

Posted 2011-02-19T15:55:24.587

Reputation: 1

-1

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. 

Muuuahhhaa

Posted 2011-02-19T15:55:24.587

Reputation: 1

The question isn't about preventing the pc from going to sleep, but finding a way making the screen blank without sleeping the pc, those aren't the same! – Máté Juhász – 2015-10-19T16:40:57.990