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?