I don't know about a C40 code, there is a C42 Ignition switch signal. Did you meter the battery or test? The key interacts with the tumblers of the lock which allows the switch to rotate and make contact depending upon where the switch is positioned. If there is something going on with the ignition switch, I don't see how the key is the problem. Do you think possibly that the ignition is not being shut off when you turn the key to off? Is there a drain on the battery? There are fuses which should protect the battery and electricals. A bad R/R can kill a battery, but I don't know about the ignition doing that unless it is shorting out and draining the battery somehow. You can test the switch in the off position to see if there is still power leaving the switch.