Well here's the situation I have injected a dll into a process, I want for example when I press F5 something to happen. I could use GetAsyncKeyState without a problem for that but that is system-wide i could press F5 in my VS and still the dll will toggle. I could make checks for foreground windows but I'm asking whether there is a sexier alternative that is process-wide ( accelerators won't work since I don't own a window except a message-only window and since windows only process keystrokes if focused my hidden window doesnt help me ). Something that could tell me whether a key is pressed within my process without mapping the windows messages I guess ( or a workaround to using accelerators with a message-only window).
Thanks in advance.