c# - WM_KEYDOWN : how to use it? -
I am trying to send a major stroke in an application through postmasses. I am also trying to understand the message using Spy ++ because I can not fully understand its inner workings.
In this picture, the first item (selected The item was created with a real key stroke made by me. Around it was made with one of the red slippers (below) the following code:
WinApi.PostMessage (InsideLobbyHandle, WinApi.WM_KEYDOWN, (int) WinApi.VK_UP, 1);
I think this will have to do with the previous post message (parameter), but I do not know how it really works. I can see ScanCode = 48 in the original key stroke, and in my own 0, the other is faxed and my 0 is. How can I see it?
I can not understand the last parameter is working.
By using the keyboard input, not PostMessage.
You can not do
The keyboard is still in relation to state / async-state:
The SendInput function does not reset the current state of the keyboard. Therefore, if a user's keys are pressed while calling this function, they can interfere with the event that is generated by this function. If you are worried about possible intervention, check the status of the keyboard with GetAsyncKeyState function and correct as needed.
- The first 16 bits are repeated count
- The next 8 bits are the scan codes
- The next bit is 1 for extended keys, 0
- The next 4 bits are reserved and must be 0
- The next bit is always 0
- The next bit is the last key position
- The last bit is always 0 (for WM_KEYDOWN)
A warning: Postmessage Based on any of the The solution is going to be very brittle.
Comments
Post a Comment