The template already includes exactly how you can do that. The instructions are in the second part of the article.
With a native framework, you should be able to add a NSEvent addGlobalEventListener to listen to modifier key changes. Then its about finding the correct method to activate Zoom mode, or maybe faking as the original keypress.
I haven’t tried yet, but I looked a bit into the API, there was a class called MSExportInspectorViewController, you can find it at:
There are a few views property in the ViewController, you should be able to inject some views into it.