In the good old days, the scripts by Adobe for FontLab, allowed the script behaviour to be changed by holding particular keys. Holding the ctrl key, ran the script without the UI for instance.
I understand this may not be possible. I also wouldn’t want it to become a Tekken kill key combo either.
from AppKit import NSCommandKeyMask
cmdPressed = bool(NSEvent.modifierFlags() & NSCommandKeyMask)
if cmdPressed:
print "Gotcha. You are holding down your CMD key!"