Key Door

Key Doors (also known as Locked Doors) are doors the player cannot enter unless they have collected a key. Locked 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. 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 galaxy's mission "Matter Splatter Mansion", multiple Key Doors can be unlocked at once with one key.

Super Mario Maker
Key Doors were introduced in Super Mario Maker in the version 1.40 update. They can be produced by shaking a P Door (which in turn is created by shaking a Warp Door).

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.