Option and command keys in Mac OS X are swapped and keyboard preferences do not set them back

On my MacBook Pro, I occasionally use external keyboards, generally Windows ones and things have been fine.

Yesterday, I plugged in a new one, remapped the command/option keys so the windows/alt keys were in the same configuration, again, nothing new here. However, this time when I unplugged the USB keyboard, the laptops option/command keys remained switched.

More annoying is that if I go into the System Preferences -> Keyboards -> Modifier keys, remapping the keys to actions does not work. I can use the drop downs to disable any specific keys, but switching the behaviours does nothing. (Cmd/Option obvious, tried remapping anything to caps lock and a few other combinations, no joy. Restore defaults set the configuration to what I'd expect, but the settings are evidently ignored.)

So: Any ideas?


I had the same behavior.

Clicking the Restore Defaults button in the Modifier Keys... pane of the Keyboard & Mouse panel of the System Preferences (take deep breath) of 10.5.8 didn't work to unswap the Command and Options keys. However, I clicked "Restore Defaults" after plugging in a non-Apple (external) keyboard, and the MacBook Pro keyboard started working correctly (a big relief).