One of the chambers which had to be crossed to get to the hiding place of the Philosopher's Stone was filled with hundreds of bewitched, jewel-like flying keys. In order to pass out of the chamber, a person must find the key which fits the lock of the door on the far side. The correct key is an old-fashioned one, silver with bright blue wings. Several broomsticks are provided along the wall to be used to fly up and try to catch the right one.
ring of keys for the seven locks on the seven-lock trunk
Arthur Weasley found a few shrinking door keys on one of his nighttime raids. These keys are bewitched to shrink so their Muggle owners can't find them. When asked why anyone would make keys shrink, he explained:
"Just Muggle-baiting...Sell them a key that keeps shrinking to nothing so they can never find it when they need it...Of course, it's very hard to convict anyone because no Muggle would admit their key keeps shrinking--they'll insist they just keep losing it. Bless them, they'll go to any lengths to ignore magic, even if it's staring them in the face..." (CS3)