Key Door

Key Doors (also known as Locked Doors) are doors the player cannot enter unless they have collected a key. Key Doors usually have the appearance of a regular Warp Door with a keyhole.

Super Mario Bros. 2
Key Doors make their debut in Super Mario Bros. 2, first appearing in World 1-2. They can be opened only by keys. If the player picks up a key for a Key Door, a Phanto will chase the player.

Super Mario 64 / Super Mario 64 DS
Keys in Super Mario 64 are used to open Key Doors that lead to new courses and, in the DS remake, Key Doors that hold Mario, Luigi, Wario, and a secret Power Star.

Super Mario Advance 4: Super Mario Bros. 3
While Key Doors do not appear in Super Mario Bros. 3, one can be found in the Game Boy Advance remake Super Mario Advance 4: Super Mario Bros. 3, in the World-e-exclusive level Doors o' Plenty.

Super Mario Galaxy
Key Doors appear in the Ghostly Galaxy in Super Mario Galaxy, where they automatically open as soon as Mario or Luigi obtains a key. In the case of the mission Matter Splatter Mansion, multiple Key Doors can be unlocked at once with one key.

Super Mario Maker series
Key Doors were introduced in Super Mario Maker in the version 1.40 update, and available at the start in Super Mario Maker for Nintendo 3DS. They can be produced by shaking a P Warp Door (which in turn is created by shaking a Warp Door). They also appear in Super Mario Maker 2, with the same function as in the previous game. As of version 3.0.0 of Super Mario Maker 2, Cursed Keys can also be used to unlock Key Doors.

Super Mario Run
Key Doors appear in Super Mario Run in the level Boohind Lock and Key, where they can be opened only with keys. Once entered, Key Doors cannot be entered again. Key Doors resemble Ghost House doors from New Super Mario Bros. U but with keyholes in the center.

Captain Toad: Treasure Tracker
Key Doors appear again in Captain Toad: Treasure Tracker, behaving like in previous Mario games.

Trivia

 * In the original Super Mario Bros. 2, once a Key Door is unlocked, it disappears. In the remakes, only the keyhole disappears by transforming them into normal swing-open Warp Doors.
 * In the Super Mario Mash-up in Minecraft, there is a painting of Key Doors from Super Mario 64.