The OP has provided a reasonably good description about the problem but still some details would be useful. Which car is it, a C-class as in the signature but which MY? Keys are completely different on the current C compared to older models. Is it a Keyless Go key? The misbehaving key does not open/close door locks, neither starts the car?
Assuming it is the 204 series type "normal key" and does not operate locks, neither starts the car with the key in the ignition lock, the problem indeed sounds weird. It isn't the IR led as the OP has tested it. It isn't the power coil as it would not affect door locks, just starting the car. It does not seem to be a stuck key switch as the OP would have observed that when testing IR. Battery is not needed to start the car although it seemed to be OK. If the key coding was corrupt, the car should give a "wrong key" warning at the cluster (W204 and newer).