So I'm trying to make an application in C# that executes some code before one locks his/her computer with Windows Key+L.
I don't have any experience with keyboard hooks whatsoever. I searched the web and found a nice implementation of a keyboard hook: Low-Level Keyboard Hook in C#
However, since the LWin and RWin key aren't modifier keys (as far as I understand), I cannot get the above mentioned example working for my case.
Does anyone have some sources and/or examples on how I can capture the LWin+L or RWin+L key combination?
I failed to find examples or information about how to prevent windows from locking itself with the Win+L key combination too. Is this even possible? If yes, how would I be able to achieve this?
Thanks in advance!