The @ key types < (or the other way round) on a Mac

Two keys swapped on an ISO Mac keyboard: the cause is almost always the keyboard type macOS detected.

The symptom

On a Mac with a French, Belgian, Swiss or Spanish keyboard, the key that should type At sign @ types <, and the < key types @. Every other key works normally.

The cause

European keyboards use the ISO format: they have one more key than US (ANSI) keyboards, next to the left Shift. If macOS thinks your keyboard is ANSI, it swaps that key with the one below Escape. This is common with external keyboards, especially non-Apple ones.

The fix

  1. Connect the affected keyboard, then open System Settings › Keyboard.
  2. Click Change Keyboard Type… (the button appears when an external keyboard is connected).
  3. Follow the assistant: press the keys it asks for, then choose ISO (European).
  4. Test again: the two keys should now be in the right place.

Still not working?