Modifier key settings not sticking

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?


Solution 1:

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:

  • Logging out and in resets modifier keys to defaults
  • Permanently swapping option and command keys on a non-Apple keyboard
  • How do I make Mac OS X remember "Modifier Keys" remappings for my external keyboard?

Solution 2:

I have been experiencing the same problem, but in OSX 10.9.4. Namely, in System Preferences I remap Caps Lock to Ctrl, and it reverts itself back to Caps Lock after a day or two for no discernable reason.

To solve this you can use Seil to remap your Caps Lock key. Additionally, you can use Karabiner for a huge range of other keyboard settings.

Solution 3:

For others facing this problem, Repairing Permissions of the startup disk with Disk Utility did the trick for me.

Solution 4:

I had a similar problem on OS X 10.11.2 with a Microsoft Natural Ergonomic Keyboard 4000 - where the modifier keys switched back after a few minutes. The Intellitype driver didn't help - it doesn't seem to do anything.

Karabiner solved the problem.

A really useful reference if you have that particular keyboard is Using Microsoft Natural Ergonomic 4000 Keyboard with Mac OS X El Capitan (10.11)