It is probably too much to ask, but Is there an easy way to invoke a given event or MODE change simply by changing the state of an input pin? I don’t know if any inputs are pulled up internally, but if they are, using one of those would be ideal. Pulling the pin LOW would force the MODE change. Releasing it would allow it to go back to the previous MODE. Doing it that way would be easier than decoding and generating a Mavlink message. And even easier than handling PPM or PWM signals.
Yep, scripting, have a look at the button and mode change bindings. Not available on 4.0 you will have to use a dev version.