1. Remove the sunroof switch.
2. Inspect for continuity between the sunroof switch terminals using an ohmmeter.


Sunroof switch removal/installationMazda 6 Service Manual: Air intake actuator inspection
1. Connect battery positive voltage to terminal D or F and ground to terminal
F or D of the air intake actuator.
2. Verify that the air intake actuator operates as shown below.
If not as specified, replace the air intake actuator.
...
Mazda 6 Service Manual: Keys
WARNING
Do not leave the key in your vehicle with children and keep them in a place
where your children will not find or play with them: Leaving children in a
vehicle with the key is dangerous. This could result in someone being badly injured
or even killed. Children may find these keys to be ...