I know there are a lot of resources already on how to capture a global hotkey with C# (using Ctrl, Alt, or whatever else), but I haven't seen any that work with the Windows key.
Is it possible to have a program capture and respond to a Win+* global keyboard shortcut? For example, show a form if the user presses Win+Z or something like that.
The Windows keys can be used as any other modifier (
const int MOD_WIN = 0x0008
according to MSDN). I have tested this with aRegisterHotKey
-based code and works fine.UPDATE
Sample code showing how to hook different combinations of keys including the Windows keys by relying on
RegisterHotKey
(LParam
values collected manually):