I'd like a shortcut that makes the screen go to a black screen immediately.

What ways can I do that?

How more efficient the solution is to set up, the better.

link|improve this question

69% accept rate
feedback

3 Answers

up vote 5 down vote accepted

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.

link|improve this answer
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 Feb 19 '11 at 16:08
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 Feb 19 '11 at 19:13
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. – Dennis Williamson Feb 19 '11 at 23:03
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 Feb 20 '11 at 2:07
1  
For anyone interested this Microsoft page lists the various WM_SYSCOMMAND messages and their hex values. – martineau Feb 20 '11 at 2:20
show 16 more comments
feedback

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 simply 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 Monitorr 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...

link|improve this answer
hmm, can you include how to do this automatically with a keyboard shortcut? if you're familiar with whatever software does it – barlop Feb 19 '11 at 16:23
1  
@barlop: From the examples nircmd.exe cmdshortcutkey "c:\temp" "Turn Monitor Off" "Ctrl+Shift+M" monitor off – Dennis Williamson Feb 19 '11 at 16:49
@DennisWilliamson: Oh, didn't see that. Updating answer a second time... – Tom Wijsman Feb 19 '11 at 16:51
@Dennis Williamson That just creates a lnk file for it. doesn't run the lnk file on a shortcut – barlop Feb 19 '11 at 17:16
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 Feb 19 '11 at 18:07
show 6 more comments
feedback

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.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.