Reputation: 8077
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
Upvotes: 1
Views: 1150
Reputation: 1191
It's definitely doable, but I'm afraid you need to pinvoke:
GetAsyncKeyState could be relevant, too
Upvotes: 1