94

I sometimes hook up my MacBook to a Windows keyboard. The annoying thing is that on Windows keyboards, the modifier keys at the lower left are layed out as

Ctrl - Windows - Alt

while Apple keyboards use

Ctrl - Alt - Apple key

The Windows key functions as the Apple key. The problem is that they are located at a different location, and my muscle memory is so set on finding the Command key next to the space bar that I keep executing my shortcuts with Alt i.s.o. Apple key (and vice versa).

Short of buying an Apple keyboard, is there a way to remap both keys in OS X?

1
  • You can buy nice keyboards (e.g., with mechanical switches) that macOS works with and have the appropriate keycaps, it doesn't have to be Apple-branded. Commented Dec 6 at 21:55

3 Answers 3

116

Update 2024-04-29:
Apparently Apple has been screwing around with the whole Preferences interface for some number of system versions (most of which I'd skipped over).

On macOS Sonoma, v14.4.1:

  • Open System Settings (which looks nothing like the former System Preferences and not much like any previous way of doing such things).
  • Search for 'modifier' and click on 'Customize modifier keys' (because this item is not listed in the left sidebar - ?!).
  • Select a keyboard (if you have more than one). The modifier keys' mapping works like it used to (now that you've found it)!

My previous answer, below, is correct for macOS Monterey (12.x) and earlier versions:
In System Preferences | Keyboard | Modifier Keys you can swap these two (and any other) modifier keys.

9
  • 15
    What I find interesting is that you can change it per keyboard (so you can make it different for the laptop keyboard and the external keyboard) Commented May 23, 2012 at 10:56
  • 5
    This solution may no longer be effective - I could not get the built-in Modifier Keys solution to work on Yosemite (OS X 10.10) with a Corsair K70 keyboard. This answer provides an external solution which I found worked well, and is the suggested replacement for the linked Double Command.
    – Adam S
    Commented May 25, 2015 at 13:37
  • 1
    For what it's worth, making the changes under Modifier Keys worked for me. I'm using a Logitech K350 and running OS X El Capitan 10.11.4. Commented Apr 6, 2016 at 18:31
  • Working for Sierra, too.
    – Benjamin R
    Commented Aug 19, 2017 at 0:55
  • 1
    Working for me in Oct '20 and Catalina for my external keyboard. With that setup it is actually essential to select the keyboard you are modifying.
    – tishma
    Commented Oct 20, 2020 at 6:53
44

Under the Keyboard System Preferences pane, there is a button for "Modifier Keys" which allows you to remap command/option/control on a per-keyboard basis. There isn't any need to use an external tool to switch the keys.

Modifier keys screenshot

I'm using OS X v10.11 (El Capitan) and Microsoft Sculpt keyboard.

1
  • 1
    This is a great answer, nice that this is a mac native option.
    – windmaomao
    Commented Mar 11, 2022 at 21:09
9

This question still pops up when searching today. Steps seem to have changed slightly in newer versions of macOS.

You need to go to System Settings > Keyboard Keyboard settings in System Settings

Click on Keyboard Shortcuts... then select Modifier Keys Modifier Keys in Keyboard Shortcuts

Make sure you have selected the right keyboard from the dropdown on top. From there, you can manually swap Option key to be Command, and Command key to be Option.

You must log in to answer this question.

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