Skip to main content
GameDev.net gamedev.net
🔒 Locked

[Win32] Alternative to SendInput for virtual key-presses

Started by Scet Jan 6, 2010 at 5:29 PM 0 replies 2.6k views
Original Post
Scet
Scet
I want another program of mine to send "virtual" key press to another(an SDL program to be specific). I've been able to get SendInput to work, but it seems like a horrible hack. I'd like something that doesn't require the window be in focus, because all the functions to tell if a window is in focus(IsVisible,GetForegroundWindow) will report it is in focus even when still switching or drawing. I've tried sending messages to the handle with SendMessage/PostMessage, but that doesn't work at all. Does anyone know of a better way?

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.