Hi,
Don't know if it is feasible to do but here are some keywords all dealing with focus:
SetCapture
WM_SETFOCUS
WM_KILLFOCUS
WM_ACTIVATE
Running multiple checks everytime it recieves keyboard input seems like it would incur a performance overhead assuming all checks involve API calls. Although, I am not familiar with DirectInput, might do things slightly differently.
Anyway, preventing an application from knowing whether it has focus or not could be problematic. If the window actually sets the caret position on key presses you could end up with pretty wierd behaviour.
Might be easier if your key cloning software actually activated the window before sending the keys but then it will probably have to implement some kind of buffer to queue keystrokes while it is busy swapping between windows to send keys.
Connect With Us