Unix commands to overrun OS X Finder shortcut cmd-opt-esc
To get this to work you have to use a third party tool: Karabiner.

In the example below the key combination cmdoptesc darkens the monitor.


Download, install and open Karabiner
Open in the menulet Karabiner -> Preferences
Open the tab Misc &amp; Uninstall
Hit the button Open private.xml
Open the file private.xml with an appropriate editor
Enter the customized keycode

&lt;?xml version="1.0"?&gt;
&lt;root&gt;
    &lt;item&gt;
        &lt;name&gt;Disable Command Option Escape&lt;/name&gt;
        &lt;identifier&gt;disable_cmd_alt_esc&lt;/identifier&gt;
        &lt;autogen&gt;__KeyToKey__ KeyCode::ESCAPE, MODIFIERFLAG_EITHER_LEFT_OR_RIGHT_OPTION, MODIFIERFLAG_EITHER_LEFT_OR_RIGHT_COMMAND, ConsumerKeyCode::BRIGHTNESS_DOWN&lt;/autogen&gt;
   &lt;/item&gt;
&lt;/root&gt;

Save the file
Open in the menulet Karabiner -> Preferences the tab Change Key
Hit the ReloadXML button
Enable the remapping. It should be listed at the beginning.




You may refine the customized key code by adding a shortcut to brighten the monitor again to avoid a totally darkened screen and a helpless student sitting in front of it - unable to continue the test:

&lt;?xml version="1.0"?&gt;
&lt;root&gt;
    &lt;item&gt;
        &lt;name&gt;Disable Command Option Escape&lt;/name&gt;
        &lt;identifier&gt;disable_cmd_alt_esc&lt;/identifier&gt;
        &lt;autogen&gt;__KeyToKey__ KeyCode::ESCAPE, MODIFIERFLAG_EITHER_LEFT_OR_RIGHT_OPTION, ModifierFlag::COMMAND_L, ConsumerKeyCode::BRIGHTNESS_DOWN&lt;/autogen&gt;
        &lt;autogen&gt;__KeyToKey__ KeyCode::ESCAPE, MODIFIERFLAG_EITHER_LEFT_OR_RIGHT_OPTION, ModifierFlag::COMMAND_R, ConsumerKeyCode::BRIGHTNESS_UP&lt;/autogen&gt;
   &lt;/item&gt;
&lt;/root&gt;


In the first configuration each key combination (cmd_l/ralt_l/resc) darkens the screen. In the second configuration cmd_lalt_l/resc darkens and cmd_ralt_l/resc brightens the screen.

Karabiner also allows you to define application-only key codes. By adding your app to /Applications/Karabiner.app/Contents/Resources/appdef.xml or to private.xml you can restrict the customized key code to your app's realm. Below the &lt;identifier&gt; tag you have to add a line &lt;only&gt;Your_App's_Name&lt;/only&gt; then.



Depending on your app you probably have to disable some other shortcuts too: e.g. cmdQ. Additionally you may have to hide Karabiner in the menubar.