Question:
Why is it permissible to use a Shabbos belt to carry keys - the belt isn’t necessary to keep my pants up. Doesn’t the belt needed to serve a function?
Answer:
When Shabbos keys are made as a part of the belt, the intention is that they are worn to hold up one's pants. If one already has a belt inside his pants, then a second belt on top of it is problematic according to the Rema 301-36, unless it is worn on top of another garment to keep it in place. If the belt is being worn as belts are normally worn, even if it isn't needed to keep the pants from falling down it is still permitted since it is worn like a garment, and it does have a function, to keep ones pants in place. The key however has to be helping the belt serve it's function, such as acting as the pin that hooks into the holes of the belt.
Best wishes
Sources:
O:CH 301-7, 36, M:B 7, 84,85.