The auto up function should always engage when the key is kept in the lock position after closing up the car. The auto down feature needs to be tricked into working by holding the key on the open side for a long period immediately after you've closed the car and windows with the auto close function. Your moon roof should not open with the key, but it will close with the key correct? This auto up and down feature puts a lot of strain on the vacuum pump that runs the show (I think) so don't do it too many times.
1994 E320 Wagon (Died @ 308,669 miles)
1995 E300 Diesel (194,000)
1999 E300 Turbodiesel (244,000 miles, dies at 255,000)
2006 Toyota Tundra SR5 AC 4X4 (115,000 miles)
2011 Audi A4 Avant (129,000 miles) hate this car!
BMW 330 xi 6 speed manual (100,034 miles)