If the matching key for a locked door is found in the player's or NPC's inventory, he automatically unlocks the door and enters.