I am working with the Wacom graphic tablet and stylus pen. The Stylus button executes a custom Photoshop script. I like to add new functionality to the script to simulate a Mac keyboard modifier key state.
The idea is on the stylus button press the Option key is activated. On the stylus button release, the Option key is deactivated.
So far, I try making an apple script that did not work very well and required executing the AppleScript file from the custom Photoshop JSX file. What other programming options exist to simulate the Option key toggle?
OSX Catalina
Mac keyboard