Else IF [Get ( TriggerModifierKeys ) = 16 and Get ( TriggerKeystroke ) = "." ]
Thank you for your reply. This was among the first things I tried, but I tried it again to be sure. It doesn't work. I probably should have included my various attempts in my first post because now I can't remember them.
Here is the current (annotated) script:
If [Code (Get(TriggerKeystroke))=10] // enter key -- THIS WORKS
Perform Script ["apply comment"]
Else If [Get ( TriggerModifierKeys ) = 16 and Get ( TriggerKeystroke ) = "."]
Close Windew [Current Window] //window doesn't close with keys, but does close with button with same settings
Oh yeah, command period is the Mac version of pressing escape to halt a script. You might try this again with Allow User Abort [off] as the first line of the script, but I doubt it will work even then.
The trouble is that key combinations that are used as short cuts for other things get processed before onLayoutKeystroke and when that happens, the trigger is not tripped at all--resulting in no script happening.
That makes sense. I tried user abort and you're right, it didn't work either. Oh well. Thank you for at leat solving the mystery.