Check out In Moyl Arayn about Schlissel Challah, for a good bibliography and discussion.
She writes, among other things:
Marvin Herzog’s discussion of the geography of hallah decoration includes mention of traditional hallah ornaments including “birds, ladders, hands, keys, and other objects that might facilitate the ascent of prayers into heaven.” Herzog also cites Uriel Wienreich’s 1962 article “Cultural Geography at a Distance: Some Problems in the Study of East European Jewry,” which demonstrates that the distribution of these designs was regional (32). These articles only mention dough shaped like keys, not baking actual keys in the dough.
This would argue in favor of it being a segulah from the get-go, in contrast to my prior suggestion...