I'm trying to send a WM_KEYDOWN/WM_KEYUP pair to an application which normally does NOT respond to the use of the KEYBDINPUT struct. I will need to send the escape key, as well as alphanumeric characters. As the MSDN only gives vague information on using the hardware struct, I could only assume that the uMsg field is meant to hold WM_KEYDOWN/WM_KEYUP messages, and the the next two fields are for the LOWORD and HIWORD of lParam (composed of several bits which define the scan code, whether or not the key is 'repeating', and so on).
But after several hours of tweaking around these values, I'm at a total loss on how to correctly simulate a hardware keystroke. What can I do to get this to work?