Robb2018 wrote: I'd considered installing a microswitch somewhere but would prefer to not have to bother with having to turn it on and off.
I soldered a wire to my KZ1000's ignition switch that runs to a relay to switch on and off accessories that I don't want to be able to have on except when the key is in the ignition.
I soldered in a second wire where the yellow one is. The yellow is what my wiring diagram said to use, and I double checked it with a multimeter before doing it. Check your wiring diagram before you attempt this. Your KZ900 is not a KZ1000-Police, so the colors might be different. Also, always confirm the wiring diagram with a multimeter.
This is pretty safe to do as long as the only thing being powered off of it is the switch on the relay. The power that the relay sends to the accessories comes from the battery instead of from the ignition switch. It also works rather well.
This is the relay that I used.
www.amazon.com/Pack-EPAuto-Relay-Harness...id=1593550877&sr=8-7
I don't recommend doing this unless you have experience with soldering DIY electric circuits, though.