This is a follow up to How can I map the Windows key to option in Microsoft Remote Desktop version 8?. The answers to that question are a huge timesavers for OSX RDC users; however, there are some key combinations I don't want remapped. For example, Command+Q and Command+W would ideally still function the same as they do before remapping.
I tried adding this definition:
<autogen>
__KeyToKey__
KeyCode::Q, ModifierFlag::COMMAND_L,
KeyCode::Q, ModifierFlag::COMMAND_L
</autogen>
But to no effect.
Update: here is the full private.xml
:
<root>
<appdef>
<appname>Microsoft Remote Desktop</appname>
<equal>com.microsoft.rdc.mac</equal>
</appdef>
<item>
<name>Swap command and option in Remote Desktop</name>
<identifier>private.remotedesktopswapcommandandcontrol</identifier>
<only>Microsoft Remote Desktop</only>
<autogen>
__KeyToKey__
KeyCode::Q, ModifierFlag::COMMAND_L,
KeyCode::Q, ModifierFlag::COMMAND_L
</autogen>
<autogen>__KeyToKey__ KeyCode::TAB, MODIFIERFLAG_EITHER_LEFT_OR_RIGHT_OPTION, KeyCode::TAB, ModifierFlag::COMMAND_L</autogen>
<autogen>__KeyToKey__ KeyCode::OPTION_L, KeyCode::COMMAND_L</autogen>
<autogen>__KeyToKey__ KeyCode::COMMAND_L, KeyCode::OPTION_L</autogen>
<autogen>__KeyToKey__ KeyCode::OPTION_R, KeyCode::COMMAND_R</autogen>
<autogen>__KeyToKey__ KeyCode::COMMAND_R, KeyCode::OPTION_R</autogen>
</item>
</root>
__KeyToKey__ KeyCode::COMMAND_L, KeyCode::OPTION_L
will always overrideKeyCode::Q, VK_COMMAND | ModifierFlag::NONE
. I was actually able to get it working with the counterintuitive__KeyToKey__ KeyCode::Q, VK_OPTION | ModifierFlag::NONE, KeyCode::Q, VK_COMMAND | ModifierFlag::NONE,
at the END. If you have a better solution, let me know. Or just update your answer with that, and I'll accept for the assist. – wst Feb 13 '14 at 18:51