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. So far, I try making an apple script that did not work very well and required executing the AppleScript file from the Photoshop Javascript file. What other programming options exist to emulate the Option key toggle from within a javascript file?