Change Modifier Key While Application is frontmost What I'm trying to accomplish is to intercept or change Command and replace it with Control for use while another application is running and frontmost.

Is there a way to temporarily change modifier keys on the Mac using a script?

For example, an applescript could be saved as Stay Open and would intercept a keystroke and change the keystroke to another keystroke.
You could use a private.xml like this with KeyRemap4MacBook:

&lt;?xml version="1.0"?&gt;
&lt;root&gt;
  &lt;appdef&gt;
    &lt;appname&gt;EMACS&lt;/appname&gt;
    &lt;equal&gt;org.gnu.Emacs&lt;/equal&gt;
  &lt;/appdef&gt;
  &lt;item&gt;
    &lt;name&gt;test&lt;/name&gt;
    &lt;identifier&gt;test&lt;/identifier&gt;
    &lt;only&gt;EMACS&lt;/only&gt;
    &lt;autogen&gt;__KeyToKey__ KeyCode::COMMAND_L, KeyCode::CONTROL_L&lt;/autogen&gt;
    &lt;autogen&gt;__KeyToKey__ KeyCode::CONTROL_L, KeyCode::COMMAND_L&lt;/autogen&gt;
    &lt;autogen&gt;__KeyToKey__ KeyCode::COMMAND_R, KeyCode::CONTROL_L&lt;/autogen&gt;
  &lt;/item&gt;
&lt;/root&gt;