cchitsiang
11/17/2014 - 6:07 PM

Karabiner private.xml to swap option and command keys for Parallels

Karabiner private.xml to swap option and command keys for Parallels

<?xml version="1.0"?>
<root>
  <appdef>
    <appname>PARALLELS</appname>
    <equal>com.parallels.desktop.console</equal>
  </appdef>

  <devicevendordef>
    <vendorname>MICROSOFT</vendorname>
    <vendorid>0x045e</vendorid>
  </devicevendordef>

  <deviceproductdef>
    <productname>MICROSOFT_ERGONOMIC_KEYBOARD</productname>
    <productid>0x00db</productid>
  </deviceproductdef>

  <item>
    <name>Swap Command and Option (Parallels)</name>
    <identifier>private.app_parallels_swap_command_and_option</identifier>
    <only>PARALLELS</only>
    <device_only>DeviceVendor::MICROSOFT, DeviceProduct::MICROSOFT_ERGONOMIC_KEYBOARD</device_only>
    <autogen>__KeyToKey__ KeyCode::OPTION_L, KeyCode::COMMAND_L</autogen>
    <autogen>__KeyToKey__ KeyCode::COMMAND_L, KeyCode::OPTION_L</autogen>
    <autogen>__KeyToKey__ KeyCode::COMMAND_R, KeyCode::OPTION_L</autogen>
  </item>
</root>