Intercept WindowsKey + L (Lock) keypress in C#?
Is it possible to intercept the WindowsKey + L (The short cut to lock the console) from a running application?
I've got an app that needs to catch that and display a custom window for about 5 seconds, then allow the lock to go through.
Can I do this in natively in c#? If 开发者_开发技巧not, can I do this with some sort of Windows API?
Thanks in advance
It's definitely doable, but I'm afraid you need to pinvoke:
SetWindowsHookEx
LowLevelKeyboardProc
GetAsyncKeyState could be relevant, too
精彩评论