• Advertisement
Sign in to follow this  

sending key press with sendinput()

This topic is 4373 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I need help sending an escape key press to whatever window has focus. Ive had success sending other key presses but im having trouble with escape. I have a window that is suposed to close when escape is pressed. here is the code im using. INPUT key; key.type = INPUT_KEYBOARD; key.ki.wVk = VK_ESCAPE; key.ki.dwFlags = 0; key.ki.time = 0; key.ki.wScan = 0; key.ki.dwExtraInfo = 0; SendInput( 1, &key, sizeof(key) ); Im pretty sure that the code is fine so why wont the window respond to the sendinput() but it will respond if i press the escape key?

Share this post


Link to post
Share on other sites
Advertisement
Sign in to follow this  

  • Advertisement