Got a jolt or a real shock, like spark to the hand? Need to know if this was static buildup or if you accidentally bridged a circuit. Was it from the keychain metal or the plastic part?
Was it one of those spinning things that uses the magnet through the plastic? Those things can build up a nasty static charge if the plastic isn't grounded right. I learned the hard way with a cheap desk toy that zapped me every time I touched the base. Might be worth wrapping the keychain bit in a bit of electrical tape just to break the contact. Or just ditch the trick and stick to a regular key ring, less chance of getting lit up.