Search code examples
c#winformsdetecthotkeysshift

Detect shift key on application startup in C#/Windows Forms


Is there a way to get a standard Windows Forms application to detect if the Shift key is being held down on application startup - without using Windows hooks?

I ideally would like the workflow to change from normal if the shift key is held down when the EXE file is run.


Solution

  • Here is an article about reading the key states (and mouse) directly.