There are some built-in keyboard shortcuts to do this if you're willing to relearn them.
SHIFT-CTRL-C will clear the output window and CTRL-TAB will switch between world windows.
If you still want to stick to your old commands, take a look at Accelerators in the help files. Still, ESC can not be used as a "pre"-type key-sequence like CTRL, ALT or SHIFT, although it can be used as the ending key like CTRL+ESC.
Using world.DoCommand, you can call the following within your accelerator scripts:
world.DoCommand "ClearOutput"
world.DoCommand "World1"
world.DoCommand "World2"
world.DoCommand "World3"
world.DoCommand "World4"
...
So at least for your Clear-Output script, you could add the following line to your external script file:
Accelerator ("Ctrl+L","/DoCommand 'ClearOutput'")
However, looking at this particular one, Ctrl-L is defaulted to the 'look' macro, so you can simply edit the 'look' macro to execute an alias called ClearOut, making sure you change the Send action to "Send Now".
Then your ClearOut alias would contain:
Ensure that you change your Send_To to 12 or "Script."