In the main window "Esc" is used to get rid of the "time selection".
In the Midi Editor "Esc" is used to close the Midi editor, and it can't be changed! Grrrr.
EDIT: Maybe I should explain a little more. In the main arrange view, "Esc" is assigned to remove the "time selection", and cannot be assigned to any other action. In the Midi Editor it is not really assigned to any action but it does close the Midi Editer, and you can't assign it to any action like, "Pass through key to main window".