`xdotool type --windowid <id> <sequence>` types the sequence in the current window. It should type it in the windows with the given id.