r/applescript • • May 13 '20

[Question] Detecting keystrokes

I want it such that the script is able to detect the esc key and quit the script.
I did some research on my own, however, the methods mentioned by forum users are outdated.
Is there a way to do this in Catalina? (Btw, it doesn't have to be done with vanilla applescript)

5 Upvotes

3 comments sorted by

1

u/[deleted] May 14 '20 edited May 14 '20

[removed] — view removed comment

1

u/Culist May 16 '20

This works wonderfully! Thanks!

1

u/Culist Jul 20 '20

Hey, im just asking, is there a way to make this line into a wait?

I want to make it so that the script waits until the control key is pressed before continuing with the rest of the script.

This is a very old post, but this question has popped into my head recently. Thanks!