Setting up hotkey / keyboard shortcut that works when screen is locked


  1. Posts : 3
    Windows 10
       #1

    Setting up hotkey / keyboard shortcut that works when screen is locked


    Hi,

    I have a weird problem with my Windows 10 PC (v1909) - the PC is quite old, with a Gigabyte 770T-USB3 motherboard and Nvidia GTS 250 graphics card. It works really well except for one annoying problem. Whenever it comes out of sleep, the screen is always black - I have tried all kinds of solutions including ones listed here. I no longer believe that this problem can be fixed (this is being caused by some issue with the display driver and DWM crashing) - this is not the problem I am writing about.

    I found out that if I can change the screen resolution when the screen is blank, the screen comes back on again. I have created a scheduled task that automatically changes screen resolution when I sign in, so that if I enter the pin when the screen in blank and manage to successfully sign in, the scheduled task changes the screen resolution and the screen comes back on again. The issue is that it is really hard to sign in with the screen of :)

    Is there some way I can trigger the shortcut to change the screen resolution from the lock screen using a hotkey? Any other way to change screen resolution automatically after coming out of sleep or any other solutions are also greatly appreciated!

    Thanks in advance!
    Vij

    P.S: Yes, I can buy a new graphics card, but I feel really bad throwing away something that works 99% of the time. Also, I am cheap :)

    P.P.S: I am using NirCmd to change the screen resolution from the command line
      My Computer


  2. Posts : 43,256
    Win 10 Pro (22H2) (2nd PC is 22H2)
       #2

    Hi, just an observation: as you can do this:
    P.P.S: I am using NirCmd to change the screen resolution from the command line
    could you not create a bat file and lauch that from a shortcut, and assign a hotkey to the shortcut?

    Also, here's how to launch a task on resuming:
    Run Program When Windows Resumes from Sleep or Hibernate | SumTips
      My Computers


  3. Posts : 3
    Windows 10
    Thread Starter
       #3

    Thank you very much for the quick response. The problem is that keyboard shortcuts do not work when the screen is locked (and when my computer wakes up, the screen is locked - this is what I want as well).

    Your suggestion to run a scheduled task on wake is very useful. I'll try out the technique in the link you have provided.

    - - - Updated - - -

    As per the suggestion above (and as per this post), I created a scheduled task to run my script to change screen resolution when the computer wakes up (I used the Kernel-Power wake from sleep even 107). And this seems to be working! I now have a non-blank screen when my computer wakes up. This forum rocks!
      My Computer


  4. Posts : 43,256
    Win 10 Pro (22H2) (2nd PC is 22H2)
       #4

      My Computers


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 01:33.
Find Us




Windows 10 Forums