I know that Keyboard Maestro can’t simulate ‘Opt’ key, however it is possible to do that via AppleScript:
tell application "System Events"
key down option
What I am trying to achieve is zoom in/zoom out in the applications like InDesign or Illustrator. Currently I am using cmd + =/- which is a bit frustrating especially in InDesign: It doesn’t zoom whenever my mouse cursor is (it zooms instead to a selection, totally disrupting the view position).
OK, a couple of things (and I’m smiling as I type this, so I’m not actually ticked):
It might have been nice to know that if I run your AppleScript, how the heck do I get the option key back up? I had to reboot, because I couldn’t get it “unstuck”. Important safety tip, that would have been useful yesterday! (to mix quotes from two different movies).
Since that script does appear to work, I would imagine you could use it along with a “Simulate Scroll Wheel” action.
Don’t forget the aforementioned “key up” AppleScript afterwards.
Looks like you have a solution, but I thought I'd mention this as an alternate, and for other readers.
I don't have InDesign, so I can't test this, but my Logitech mouse has a control panel where I can (and do) set the scroll wheel to zoom AFTER I press/release the scroll wheel. Works great in every app I've tried it (Chrome, Safari, Evernote)