The Mishna Berura (Sha’ar Hatziyun 301:38) discusses going outside on Shabbos (where there’s no Eruv) while wearing a key that’s been made into a piece of jewelry. If the reason one is wearing it is to be able to use it as a key, (rather than jewelry) then it would be considered ‘carrying’. The Shulchan Aruch (OC 301:11) and Aruch Hashulchan (301:60) bring two opinions about wearing a key that is made out of silver, that serves both as a pin (brooch) and a key. According to some, it is permitted as it is a tachshit, ornament, while others forbid it as it will mislead others into thinking they can ‘wear’ their regular keys. (See Mishna Berura 301:42 and Be'er Moshe 3:65).
Other solutions for carrying a key include turning the key into a tie pin or wearing a Shabbos belt. One must ensure that when doing so, the key serves a practical purpose (unless it was silver, as above). One can’t wear the tie pin under his jumper, for example, as it would be serving no practical purpose. Likewise, one should ensure that when using such a belt, the key serves as an integral link in the belt, rather than just hang off it. If one is already wearing a belt, one can’t simply place another Shabbos belt on top or around his waist. Some use it to keep their jacket closed instead of doing up the buttons or some other practical purpose.The Shemiras Shabbos Kehilchasa (18:49) writes that if the front door opens onto the street, one must open the door while still ’wearing the key’. R’ Yitzchak Yaakov Weiss held that if the keyhole doesn’t go all the way through to the other side of the door, one hasn’t placed the key into a Reshus Hayachid. Providing the other side (inside) of the keyhole is covered, one may remove one’s Shabbos belt and open the door.