Hello Intoxx,
Good to have your response again.

Indeed it seems that I don't get the correct ID's when using the xdotool selectwindow function. When using getwindowname on the ID's from the pid it is, like your's, called "Default IME" but interestingly I wasn't able to send a key to all windows easy by just using 'xdotool key --window "Default IME" 1'.

Your right in that my first post, the command would only send to a single window, I just had that for testing and proving that it worked. Since then, to send to all I've produced the following:

In my small python application (That is detecting keys, conditions) I wanted to have a round-robin function. I know this can be achieved through wow macros but I never found that method to be that good. IE I always end up using 2 interrupts rather than one. And because my team is made of different classes I wanted the ability to use specific spells on a character but not needing a key for each one. So I wanted my app to be able to send a key to a specific window sometimes and other times to all. To save time I thought I'd just use the sub process module to pass xdotool commands to the system.

Side Note: However it looks like I maybe better just using the xdo lib or xlib directly as doing the above means I have a config file full of huge commands and because variables aren't saved between calls they need to be declared each time.

Because of this I wanted to match a character to a wow instance and this seemed difficult when I was only able to identify them by the PID. They all had the same window name but I could get xdotool to send an event to the window by using that. So the simple way I've found to overcome this is just copying 5 of the wow.exe's and renaming them. Now they can be targeted specifically. However it does mean I cannot target all and so for that I've only produced this: (See side note)
declare -a allwow='([0]=$(pidof WoW.exe) [1]=$(pidof wow1.exe) [2]=$(pidof wow2.exe) [3]=$(pidof wow3.exe) [4]=$(pidof wow4.exe))' ; for ((i=0;i<"${#allwow[@]}";i++)); do xdotool key --window $(xdotool search --pid ${allwow[$i]}) b ; done

So to answer your questions:
1: Yes I can indeed to send events to windows without them being activated, but using xdotool, only 1 window at a time and so I've had to use a for loop to cycle windows
2: These are all in different WINE PREFIX's
3: Within the WINE PREFIX's they are using the latest version (I believe). So this is version 4.0 (DXVK 1.0.1)
4: I am using the virtual desktop mode on all prefix's

Well I'm very interested in your application, so if you do release it then I'd be interested in testing this.
For now it seems to get the feature's I'm looking for I'll have to work further on my own small script/app