All doors lock automatically when the lock side is pressed. They unlock when the unlock side is pressed.
Driver's door

Front passenger's door

To lock all the doors from an open front door, press the lock side of the door lock switch and then close the door.
NOTE
When locking the doors this way, be careful not to leave the key inside the vehicle.
Locking, Unlocking with Transmitter
Auto Lock/Unlock FunctionMazda 6 Owners Manual: Combination switch removal/installation
1. Disconnect the negative battery cable.
2. Remove the driver-side air bag module. (See DRIVER-SIDE AIR BAG MODULE
REMOVAL/INSTALLATION.)
3. Remove the steering wheel. (See STEERING WHEEL AND COLUMN
REMOVAL/INSTALLATION.)
4. Remove the column cover. (See COLUMN COVER REMOVAL/INSTALLATION)
5 ...
Mazda 6 Owners Manual: Headlights
Turn the headlight switch to turn the headlights and other exterior lights on
or off. When the lights are turned on, the lights-on indicator light in the instrument
cluster turns on.
NOTE
If the light switch is left on, the lights will automatically switch
off approximately 30 seconds ...