Go to the Running Safari And Press Enter Using AppleScript
The "System Events" must to the key pressing.

for example:

tell application "Safari"
    activate
    tell application "System Events" to key code 36 #return
end tell


I don't know, what the key pressing is for, so now has no effect.

A working example, where the download list is shown and then by pressing "space" the list is cleared:

tell application "Safari"
    activate
    tell application "System Events" to keystroke "l" using {command down, option down} # cmd-opt-l
    delay 1
    tell application "System Events" to key code 49 #space
end tell