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: Gate operator/Canadian Programming
Canadian radio-frequency laws require transmitter signals to “time-out” (or quit)
after several seconds of transmission — which may not be long enough for HomeLink
to pick up the signal during programming. Similar to this Canadian law, some U.S.
gate operators are designed to “time-out ...
Mazda 6 Owners Manual: Front door glass removal/installation
1. Operate the front door glass so that the distance from the top of the
front door glass to the upper part of the rear beltline molding is 210 mm
{8.3 in}.
2. Disconnect the negative battery cable.
3. Remove the front door trim.
4. Remove the hole cover.
5. Remove the screws.
6. Insert ...