Navigate to the game on the Steam Library list, right click on it and right at the top "View CD Key" click on that and you'll get your code.