0

I have created a shortcut with below command to turn-off laptop monitor (referred from this web link).

“C:\path\to\nircmd.exe” cmdwait 1000 monitor off

This solution is working fine for turning off the monitor. Since I double-click on the shortcut icon to turn-off monitor, icon is still in the selection after turn-off.

Due to this, when I use enter key to invoke monitor, it is turning on and again went into turn-off state because of enter key usage (enter executes the shortcut icon).

Though this behavior is obvious, it took a while to understand when it happened for the first time.

Is there any other option in nircmd to use the enter key for invoking monitor?

1
  • Honestly, my suggestion would be to get the habit if using another key to wake your computer (in general). Preferably a non-destructive key, such as ctrl or alt. Prevents things like this from happening. ;) Sep 15, 2016 at 13:02

1 Answer 1

1

The only thing I can think off is adding the code towards a shortcut and use an other shortcut key like ctrl + alt + F12 this way it wont be on the selection screen, else there no other method other than unbinding your enter key to execute a program.

Edit:

It is actually stated in the article probably for a reason.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .