How to map three flight modes to a single button using herelink

Setting up flight modes with herelink, So we’ve setup 3 flight modes on a single button, Loiter, Stabilize, and RTH, using the only the Return home button on herelink, we have herelink Return home button mapped to channel 7 and configured for Flight mode switch In our (Herelink setting payload + Flight modes.ini) it toggles between 1000-2000 allowing switching between Loiter and Stabilize as shown in the Flight modes section of mission planner, additionally we have the Return home button mapped to channel 13 configured for long press and have RC13_OPTION set to a value of 4 which is RTH.
Important information, UAS operator needs to be aware of how the RTH and Flight modes button functions, If in Loiter flight mode and user then presses and holds RTH button the UAS will enter return home mode, If user then presses RTH button once quickly he now operating in stabilize flight mode, from here on any additional quick presses of RTH button switches back and forth between Loiter and Stabilize flight modes, but if user tries to use return home button again he or she will need to perform two long presses to unlatch from overridden position to off then override back on.

Additionally if the user wishes to use RTH from whatever flight mode they are in and cancel back to the flight mode they triggered RTH from, they can just press and hold RTH to turn it off and this will return back to the flight mode they triggered RTH from.

Note: a known bug in QUG is that under the Flight modes tab where you can set Switch options such as RC13_OPTION to control RTH, you will see when you trigger the RTH that channel 12 lights up instead of 13.