Unmap key combinations in KeyRemap4Macbook
The documentation suggests that these shouldn't conflict:

&lt;autogen&gt;
   __KeyToKey__
   KeyCode::Q, ModifierFlag::COMMAND_L | ModifierFlag::NONE,
   KeyCode::Q, ModifierFlag::COMMAND_L | ModifierFlag::NONE,
&lt;/autogen&gt;
&lt;autogen&gt;__KeyToKey__ KeyCode::COMMAND_L, KeyCode::OPTION_L&lt;/autogen&gt;


However, the second &lt;autogen&gt; will override the COMMAND_L of the first. The solution is counterintuitive:

&lt;root&gt;
    &lt;appdef&gt;
        &lt;appname&gt;Microsoft Remote Desktop&lt;/appname&gt;
        &lt;equal&gt;com.microsoft.rdc.mac&lt;/equal&gt; 
    &lt;/appdef&gt;
    &lt;item&gt;
        &lt;name&gt;Swap command and option in Remote Desktop&lt;/name&gt;
        &lt;identifier&gt;private.remotedesktopswapcommandandcontrol&lt;/identifier&gt;
        &lt;only&gt;Microsoft Remote Desktop&lt;/only&gt;            
        &lt;autogen&gt;__KeyToKey__ KeyCode::TAB, MODIFIERFLAG_EITHER_LEFT_OR_RIGHT_OPTION, KeyCode::TAB, ModifierFlag::COMMAND_L&lt;/autogen&gt;
        &lt;autogen&gt;__KeyToKey__ KeyCode::OPTION_L, KeyCode::COMMAND_L&lt;/autogen&gt;
        &lt;autogen&gt;__KeyToKey__ KeyCode::COMMAND_L, KeyCode::OPTION_L&lt;/autogen&gt;
        &lt;autogen&gt;__KeyToKey__ KeyCode::OPTION_R, KeyCode::COMMAND_R&lt;/autogen&gt;
        &lt;autogen&gt;__KeyToKey__ KeyCode::COMMAND_R, KeyCode::OPTION_R&lt;/autogen&gt;
        &lt;autogen&gt;
            __KeyToKey__
            KeyCode::Q, VK_OPTION | ModifierFlag::NONE,
            KeyCode::Q, VK_COMMAND | ModifierFlag::NONE,
        &lt;/autogen&gt;
    &lt;/item&gt;
&lt;/root&gt;


In this case Cmd+Q is remapped to Opt+Q but then Opt+Q is remapped back to `Cmd+Q'.