The following example handles the UNLOAD event. It is part of the events.ujml sample.
<event name="onSelect">
<accelerators>
<key>UNLOAD</key>
</accelerators>
<script>
showMessage("onSelect: UNLOAD");
</script>
</event>