Mac keyboard Option key emulation

I am working with the Wacom graphic tablet and Wacom pen. The Wacom pen button executes a custom Photoshop CC 2020 script. I like to add new functionality to the script to emulate a Mac keyboard modifier key state.

The idea, a Wacom pen button press activates the Option key. A Wacom pen button release deactivates the Option key.

In Photoshop the Option key state is not scriptable. That being the case, I like to find out what programing options exist to emulate the Option key states.

OSX Catalina
Mac keyboard