how to change keyswitch

Changing the key cylinder won't tell you anything. If the key turns, then the cylinder is ok. That tells you nothing about whether the switch is bad. If you think it is the actual switch, then what I said is still the quick way to check it.