On my external mechanical keyboard the Super/Windows/CMD key is between Ctrl and Alt, but on the Mac keyboard it's between Alt and Space.

Can I swap CMD and Alt only on the external keyboard?


There is a section dedicated to this under System PreferencesKeyboard:


Open Modifier Keys… and reassign them from here:

Modifier Keys

These settings are specific to each external keyboard you have connected. They will “stick” between reboots, as well as whenever you unplug an external keyboard and plug back it in.

| improve this answer | |
  • 1
    For some reason on my installation in macOS Sierra, there is no "Select keyboard" dropdown at all. The settings there only modify the built-in keyboard of my MacBook Pro. – Eric Majerus Nov 11 '18 at 22:56

The built-in macOS solution did not work for me because there's no option to select a different keyboard.

For macOS Sierra to Mojave (current release as of right now), Karabiner-Elements does exactly this. You can find the GitHub page at https://github.com/tekezo/Karabiner-Elements.

It runs in the background. In the preferences, you configure the target device for modification and it remembers the settings. I have a bluetooth keyboard (Logitech G613) where only that keyboard's CMD and ALT are swapped. I use this keyboard between my PC and Mac.

Below you see an example of Karabiner-Elements v12. It doesn't show my G613 because it is not connected right now.

enter image description here

| improve this answer | |

I use Karabiner for my external KB, I think it's the only utility currently available but Google is your friend. As to the second question - so far as I know, only if you can figure out a way to run Karabiner when the external KB is attached but not otherwise. HTH.

| improve this answer | |
  • The central problem is I want a solution that doesn't require me to reconfigure something every time I connect my external keyboard. I haven't found a solution on google, that's why I'm asking here. – macurie Jan 26 '16 at 22:51

You must log in to answer this question.

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