Can somebody share how to make an emissive material toggle switch on and off using key input method?

Can somebody share how to make an emissive material toggle switch on and off using key input method?