hello everybody, got this question here, thinking one of you could help me with.

hello everybody,
got this question here, thinking one of you could help me with.

got me a kossel mini, running with smoothieware on an azteeg x5 v1.1.
for a long time, I wanted to upgrade to 2 colors/materials and was reluctant to due to a new firmware change.
I saw the whole new “one nozzle, dual filament” approach and I came to a conclusion. there an option for 2 motors for the z axis. what if I changed the extruder driver to the z axis driver and use an external signal switch is there a way to set one of the pins on the azteeg x5 as the signal pin of the switch?
and what code changes I’d need to do on every material change?