How do I write this in a frame (not button)

When the code is in a button, i write

on (release, keyPress "<Enter>")

but when i want it on a frame, what should i write