MacOS – How to get Mountain Lion to recognise modifier keys from external Windows keyboard

keyboardmacos

By default, Mountain Lion maps Windows-key to Command and ctrl to ctrol. I changed the modifier keys under the "Modifier Keys" menu in System Preferences, but it had no impact. I can tell this because I changed all modifier keys to "control", but still was able to use the Windows-key as the Command key and the alt key normally. Does Mountain Lion not respect these settings with Windows keyboard??

Should I be doing something else?

Best Answer

Did you select the keyboard from the menu at the top? (Edit: it is not shown if there is only one keyboard.)

If you have installed keyboard or HID drivers, try removing them.

You could also try deleting ~/Library/Preferences/ByHost/.GlobalPreferences.*.plist.

Another way to change the modifier keys is to use KeyRemap4MacBook:

<?xml version="1.0"?>
<root>
  <!-- <devicevendordef>
    <vendorname>KINESIS</vendorname>
    <vendorid>0x05f3</vendorid>
  </devicevendordef>
  <deviceproductdef>
    <productname>ADVANTAGE</productname>
    <productid>0x0007</productid>
  </deviceproductdef> -->
  <item>
    <name>swap_command_and_control</name>
    <identifier>swap_command_and_control</identifier>
    <!-- <device_only>DeviceVendor::KINESIS, DeviceProduct::ADVANTAGE</device_only> -->
    <autogen>__KeyToKey__ KeyCode::COMMAND_L, KeyCode::CONTROL_L</autogen>
    <autogen>__KeyToKey__ KeyCode::COMMAND_R, KeyCode::CONTROL_L</autogen>
    <autogen>__KeyToKey__ KeyCode::CONTROL_L, KeyCode::COMMAND_L</autogen>
  </item>
</root>