That assumes the -15V side of the switch is supposed to go to 0V, whereas it might be that the 0V side will fall to -15V.
Also you would need an emitter resistor (which would protect the pin anyway) and would take signal up to +0.5V or so which might be an issue.