I've seen the various SendKey type apps here, but none of them can do 100% of what I need...which is go completely against all Windows standards and send keystrokes to 2+ other windows as I type in another. Sending the Key Up/Down messages to the window(s) doesn't work...most likely because it is coming from my app and not windows itself which was somewhat expected. keybd_event and SendInput do work for one window, but involves setting the other window to foreground which removes focus from the window I'm typing in.
There are a lot of mentions of AttachThreadInput too, but mostly to force SetForegroundWindow to work. What other uses are there for it? If I can't figure out a way of making other windows accept my key messages I may have to use a scripted approach and record the keys to a file that is then played to each window since I can't have a 3rd window where I manually type. It sounds like AttachThreadInput allows keys to be read or something, although I'm not seeing this. It says checking key state is an advantage, but I'd think key state would be the same in every app??? When I switch to a different app, my Caps Lock is still on, etc.
I'd really like to get it to work by passing key messages, but if anyone has any other ideas I'm open to them.
There are a lot of mentions of AttachThreadInput too, but mostly to force SetForegroundWindow to work. What other uses are there for it? If I can't figure out a way of making other windows accept my key messages I may have to use a scripted approach and record the keys to a file that is then played to each window since I can't have a 3rd window where I manually type. It sounds like AttachThreadInput allows keys to be read or something, although I'm not seeing this. It says checking key state is an advantage, but I'd think key state would be the same in every app??? When I switch to a different app, my Caps Lock is still on, etc.
I'd really like to get it to work by passing key messages, but if anyone has any other ideas I'm open to them.
Comment