It's called a caribiner and mountain climbers used them to make the ropes keep them on the mountain. I use mine to stop my stomach from plummetting to my feet when I reach my car door with a cart full of groceries and can't find my keys.
This little baby has a ring on one side and then a mountain climbing clip on the other side that opens on a spring and attaches easily to pretty much anything. Voila--your keys stay put. I clip my caribiner onto the strap of my diaper bag. or my stroller, or even my belt loop. Fashionable, I know, but I'd much rather look like a dork than be locked out of my house. (And just because it happened once doesn't mean my WFMW isn't valid. Today was a fluke, people.)
Updated to add: I got mine at DollarTree.