Using Windows Key as a modifier in KeyEventArgsExt

Dec 8, 2011 at 4:42 PM
Edited Dec 8, 2011 at 4:43 PM

In a number of applications, users may want to detect Windows Key combinations in order to trigger certain events.

For example, in the program USB Safely Remove, pressing <WinKey>+<S> triggers the safely remove form. The Windows Mobility Center form is shown when the user presses <WinKey>+<X>. I'm quite sure there are other applications out there that use Windows Key combinations as well.

 

Because this library because the KeyEventArgsExt class does not have a WindowsKey property, in order to detect Windows key combinations, you'll have to detect WinKey up and down differently from the other keys which make the combination.

My proposal is to add a WindowsKey (or similar) property to the KeyEventArgs class which will the state of the Windows key so that Winkey combinations can be easily detected and handled.

What's your take on this, community?