Fixing Swapped Keys on Your Mac

If you find that two specific keys have swapped places—common pairs include ~ and ±, or <> and #@, and so on. This is almost always caused by a mismatch between your keyboard's physical layout and your Mac's software layout.

Here are a few methods to resolve this issue and get your keyboard working correctly.

Solution 1: Select the Correct Language Layout on Your Mac

  1. Go to System Settings.
  2. Navigate to Keyboard.
  3. Click on "Input Sources".
  4. Click the "Edit..." or the "+" (Add) button.
  5. From the list, choose the corresponding language layout.
  6. Ensure this new layout is selected. You may want to remove the incorrect layout to avoid future confusion.

Solution 2: Choose the Correct Physical Layout (ANSI or ISO)

  1. In the same Keyboard Layout settings, click "Change the layout of keyboard".
  2. Follow the instructions, which typically involve pressing a key next to the Shift key. This helps your Mac identify the physical layout.
  3. When prompted, select the correct layout for your keyboard: ISO (common in Europe) or ANSI (common in the US).

image

Solution 3: Delete the Keyboard Layout Cache

  1. Unplug your keyboard.
  2. Open Finder.
  3. Press Shift + Command + G to open the "Go to Folder" window.
  4. Enter the following path and press Return:

/Library/Preferences/ image

  1. In the folder that opens, find and move the following files to the Trash:

com.apple.keyboardtype.plist

com.apple.HIToolbox.plist

  1. Restart your Mac.
  2. Plug your keyboard in again.

Was this article helpful?

0 people found this helpful

Share:

Related articles