Modifier key settings not sticking

keyboardpreferences

I just purchased a MacBook Air with OSX v10.8.4. When I edit the modifier keys (I want to change Caps Lock to Ctrl), it works for a while, but then reverts back to defaults some time later. I'm making the changes here

System Preferences -> Keyboard -> Modifier Keys…

I just tested making the change, closing the lid, then opening it. The change stuck past that. So I'm not exactly sure when the settings revert, but they do eventually revert back to the defaults.

Any idea how to make this change stick?

Best Answer

Try uninstalling any keyboard or pointing device drivers. Or delete ~/Library/Preferences/ByHost/.GlobalPreferences.*.plist and restart.

You can also use PCKeyboardHack to remap caps lock. Other modifier keys can be remapped with 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>

Related questions: