Whenever I plug my Microsoft Natural Ergonomic Keyboard into my MacBook Pro, I have to swap the Command and Option modifier keys. How can I prevent these keys from reverting to their default settings whenever I unplug the keyboard?

  • Please provide more information about your OS X version. Commented Mar 4, 2011 at 20:08
  • Mac OS X 10.6.6 Commented Mar 5, 2011 at 4:53

4 Answers 4


I assume you already know about the Keyboard Pref Pane. I had exactly the same problem with an Ergonomic and an Arc. The settings didn't stick with external keyboards.

Install KeyRemap4MacBook. It works for any Mac, btw. It remaps keys on all keyboards of a Mac - try to use Enter as Right-Cmd, e.g.

  1. Set Cmd to Alt etc. for all keyboards in KeyRemap4MacBook (both right and left).
  2. Switch the keys in the Keyboard Pref Pane for the internal keyboard. Et voilà!

I figured out that weird hack some time ago. It turned out to be rock solid. Only thing to remember: hardware based utilities such as SteerMouse use the 'real' keys, so you need to switch around some things.

  • There is an option in the system preferences. No need to install stoftware. Commented May 5, 2019 at 10:47
  • That URL won't work anymore. Commented Feb 15, 2023 at 8:56

Thanks thyx & notme for suggesting KeyRemap4MacBook. Here are my enabled settings:

  • General
    • Don't remap an internal keyboard
    • Don't remap Apple's keyboards
  • Change Command_L Key (Left Command)
    • Command_L to Option_L
  • Change Command_R Key (Right Command)
    • Command_R to Option_R
  • Change Option_L Key (Left Option)
    • Option_L to Command_L
  • Change Option_R Key (Right Option)
    • Option_R to Command_R
  • 1
    Thanks for sharing your solution (as well as your question). I was rather puzzled by this preference pane's simply God-awful user interface, but being able to see how you did it helped me out. At least it's better than starting up DoubleCommand's 32-bit preference pane every time I connected or disconnected my Natural Ergonomic 4000 (which itself was still worlds better than the random kernel panics Microsoft's official drivers were causing - remind me to tell you about the time I contacted MS's tech support for help on that…). Commented May 19, 2011 at 16:27
  • I'm glad you found my post helpful. I agree: KeyRemap4MacBook's UI is one of the worst I have ever used. Commented May 19, 2011 at 16:55
  • Also, for others who may encounter it… KR4MB does not respect the keyboard repeat rate/delay you set in the standard Keyboard control panel. Instead, you have to open up KR4MB's "Key Repeat" tab and set values in milliseconds. Yeah, no sliders… in milliseconds. Ugh. Commented May 20, 2011 at 7:21

thyx is right. Grab KR4MB here: http://pqrs.org/macosx/keyremap4macbook/ - No need to worry about it not getting updated as the dev is super responsive and is constantly tinkering with the app making it better with every release. Another note is that it's open source so if you know your way around you can make changes yourself but I doubt you will need to. It's great software, I have been using it for years and on a wide variety of keyboards with no problems that could not be easily amended by reading the prepared docs. Give it a try, if you use Safari check out his extension "keystroke." I wouldn't be able to use safari without it.


KeyRemap4MacBook is now Karabiner (currently 10.6.0); still available at the links above, and also https://pqrs.org/osx/karabiner/

Never used it before, so I can't speak to what changed with the name. It's consistent with the previous descriptions; I used the settings exactly as described in TitaniumDecoy's answer, then also mapped the Application key to Fn. Suddenly, my ancient KeyTronic LT Designer is much more OSX-friendly.

There are lots of options, so I can understand the frustration with configuring it. On the other hand, there are lots of options. Maps can depend on which application you're running, and there are a lot of preconfigured settings that take advantage of that feature.

The only thing I'd like to see added is to have different maps for different keyboards, automatically and simultaneously. You can disable mapping on Apple keyboards, and/or integral keyboards. But I can't swap CapsLock for Ctrl everywhere (yup, I <3 Emacs), while swapping Option and Command on only the PC-101 keyboard. However, you can create several profiles, and switch between them easily, so that's a 90% solution.

Joe Bob says "If you're suffering with a Windows keyboard, check it out."

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .