In the movies, Kid found out in Movie 3, when he bugged the ship's phone. When Agasa called Conan 'Shinichi', Kid grew suspcious, and his analysis of Conan throughout the rest of the movie proved his point. That's how he knows in the rest of the movies.
In the manga, it is implied that Kid might know after the end of the Ryoma's Gunbelt case, but it was never confirmed, and that's the last Kid has appeared in DC since. (He didn't appear this summer b/c Gosho released the Phantom Lady MK chapters instead) So we'll just have to wait and see.
While his knowing canonically could open up a lot of options, it would also cause a lot of problems. After all, they're both after an Organization, and Gosho has confirmed that they're separate, so Kid's knowing won't help DC's plot. So it'd be unnecessary, but fun.