hot key on launch runs a command

Hello !
I would like to know if it is possible to run a specific applescript command if a defined “hot key” is pressed at the launch of a applescript application.

E.g download latest version if “u” key is pressed when application is launched.


You can use both Jon’s Commands ( or HipTools(

--> HipTools (only checks for command, ctrl, alt, shift)
if (hipGetKeyboardState) = "C" then display dialog "command was pressed!"
--> Jon's Commands
if (keys pressed) = {"Command"} then display dialog "command was pressed!"

Gonna try this ! Thanks for the answer. :smiley: