So long as the compass is 1" or so away from any metal on the keyring you should not have any problems. A quick way to check is to take a north bearing with the compass on its own and a second one with it attached to the keyring. Just make sure that you gather everything else on the ring together on the opposite side of the ring. Anything in your pockets will get damaged sooner or later. I tend to be pathalogical about making damed certain that I keep anything carrying a magnetic field strong enough to magnatise my gear a safe distance away. That means a quick spot check against a known bearing before I go out. Takes a grand total of about 15sec's.
_________________________
I don't do dumb & helpless.