Found this powerful little free app a while back called Karabiner, formerly KeyRemap4MacBook. Since I replaced my MacBook Pro’s DVD drive with an SSD last year (and breathed new life into my aging MBP by installing the OS and applications on the SSD, with data on the original HDD), I no longer had a use for the MacBook’s eject button and decided to remap it to display the Notifications sidebar instead, which Karabiner allows me to do – very convenient.
I also spend a lot of time in Microsoft Remote Desktop for Mac, and I’m frequently frustrated by the whole Command/Control modifier key issue – Command+C in OS X is Control+C in Windows, etc. Karabiner allows you to remap the Mac Command key to the Windows Control key, but their settings are universal (within RDC), which means you can’t use Command+Q to quit RDC or Command+Tab to use the Mac app switcher (to name just a couple of keystrokes that become unavailable). I only wanted to remap a handful of keystrokes, such as Command + A, X, C, or V, to their Windows equivalents.
Fortunately, Karabiner has a private.xml file where you can define your own remaps. The app’s website already has instructions on how to edit this file (https://pqrs.org/osx/karabiner/xml.html.en), so I won’t repeat them here. Instead, I’ll just post my current private.xml below. It has only the limited keystrokes above, and apply only to RDC. I may add more later if I find another way to make doing my job easier. (I have 73 remote desktop connections configured, and that’s only on the Mac. I have at least a dozen more I can only access via my Windows virtual machine because the VPN software the client uses isn’t available for Mac. I spend a LOT of time in remote desktop.)
<?xml version="1.0"?> <root> <appdef> <appname>RDC</appname> <equal>com.microsoft.rdc.mac</equal> </appdef> <item> <name>Remote Desktop Copy/Paste (RDC only)</name> <appendix>Change Command + A, V, X, and C to Ctrl + A, V, X, and C</appendix> <identifier>rdcfkeys</identifier> <only>RDC</only> <autogen>__KeyToKey__ KeyCode::C, ModifierFlag::COMMAND_L, KeyCode::C, ModifierFlag::CONTROL_L</autogen> <autogen>__KeyToKey__ KeyCode::V, ModifierFlag::COMMAND_L, KeyCode::V, ModifierFlag::CONTROL_L</autogen> <autogen>__KeyToKey__ KeyCode::A, ModifierFlag::COMMAND_L, KeyCode::A, ModifierFlag::CONTROL_L</autogen> <autogen>__KeyToKey__ KeyCode::X, ModifierFlag::COMMAND_L, KeyCode::X, ModifierFlag::CONTROL_L</autogen> </item> </root>
Once you make changes to private.xml and click Reload XML, your custom settings show up at the top of the list: