All articles

Mac keyboard typing wrong characters? Find the layer that's lying

A Mac keyboard typing wrong characters feels like a hardware failure, and it almost never is. Between the key you press and the character that appears there are at least six software layers, any one of which can quietly change the answer: the physical keyboard type macOS thinks you have, the input source, dead keys, text substitutions, accessibility features, and modifier remapping. Each one produces a different kind of wrong. Match the symptom to the layer and the fix takes about a minute.

First, prove what your Mac is actually receiving

Before changing any setting, open Keyboard Viewer. Go to System Settings → Keyboard → Text Input → Input Sources → Edit… and turn on Show Input menu in menu bar, then pick Show Keyboard Viewer from the new menu bar item.

Keyboard Viewer draws the layout macOS believes you have and highlights each key as you press it. That single window splits the problem in two:

  • The highlighted key is the one you pressed, but the character is wrong → a software layer is translating it. Everything below applies.
  • A different key lights up, or nothing does → macOS is receiving the wrong key. That's remapping or hardware, and it's the last two sections.

It also shows you, live, which layout is loaded — which is often the whole diagnosis on its own.

Match your symptom to the layer

What you seeAlmost certainlyWhere to fix it
Letters type numbers, or the pointer driftsMouse KeysAccessibility → Pointer Control
@ and " swapped, # gives £, Z gives YWrong input sourceKeyboard → Text Input → Input Sources
Exactly two keys swapped, near Shift or ReturnWrong keyboard type (ANSI/ISO/JIS)Keyboard → Change Keyboard Type
Nothing appears until you press a second keyDead keys in your layoutInput Sources
Straight quotes turn curly, -- becomes Smart quotes and dashesInput Sources → Edit…
Keys need holding, or a modifier sticks onSlow Keys / Sticky KeysAccessibility → Keyboard
⌘ and ⌥ behave as if swappedRemapped modifier keysKeyboard Shortcuts → Modifier Keys

Letters typing numbers: Mouse Keys is on

This one catches people out because the affected keys look random. Mouse Keys repurposes 7, 8, 9, U, O, J, K and L to move the pointer, and I to click. Type a sentence and you get gaps where those letters should be, plus a pointer wandering across the screen.

Turn it off in System Settings → Accessibility → Pointer Control. While you're there, click the Options… button beside Mouse Keys and turn off the "press the Option key five times" toggle — that shortcut is how it gets switched on by accident in the first place.

Symbols swapped: the wrong input source

If @ and " have traded places, or # produces £, or Z and Y are reversed, you're typing on a US layout with a British keyboard (or QWERTY with QWERTZ loaded). The keycaps are right; the software layout underneath is wrong.

Open System Settings → Keyboard → Text Input → Input Sources → Edit… and remove every layout you don't use. Two layouts are all it takes for this to happen by accident, because Control-Space is Apple's default shortcut for Select the previous input source — an easy chord to fire while reaching for something else. If you genuinely need more than one language, keep the Input menu visible in the menu bar so the active one is never a mystery. Shortcuts colliding like this is a wider problem; our guide to shortcut conflicts covers how to work out who took a key.

Exactly two keys swapped: the wrong keyboard type

This is the subtlest one. macOS recognises three physical keyboard types — ANSI (North America), ISO (most of Europe) and JIS (Japan). They differ mainly around Return and left Shift: ISO has an extra key beside left Shift and a taller Return key. If macOS guessed wrong, most of the keyboard is fine and a small handful of keys — classically the backtick and §, or the backslash — are permanently swapped.

When macOS meets a keyboard it doesn't recognise, Keyboard Setup Assistant runs and asks you to press the key to the right of the left Shift key, then the key to the left of the right Shift key. Answer carelessly once and you live with the result.

Re-run it from System Settings → Keyboard → Change Keyboard Type. If that button isn't there — it commonly isn't for built-in keyboards — you can launch the assistant directly:

/System/Library/CoreServices/KeyboardSetupAssistant.app/Contents/MacOS/KeyboardSetupAssistant

macOS stores its answer per device in /Library/Preferences/com.apple.keyboardtype.plist, keyed by each keyboard's vendor and product ID. If the assistant refuses to stick, the community fix is to unplug the keyboard, delete that file with sudo, restart, and reconnect so the assistant runs fresh. Treat that as a last resort — it resets the type for every keyboard your Mac knows, so you'll be re-answering the question for each of them.

Nothing appears until you type a second key

If pressing ' or " produces nothing, then typing e gives you é, your layout uses dead keys. That's not a fault — it's exactly what U.S. International – PC and ABC – Extended are for. Press the spacebar after the dead key to get the literal character.

If you don't need to type accents regularly, switch to plain ABC or U.S. in Input Sources. If you do, keep the layout and learn the space trick; it's faster than any alternative.

Quotes turning curly, dashes turning long

Straight quotes turning into “ ”, apostrophes into , and -- into is macOS substituting as you type. Harmless in an email, ruinous in code or a config file.

Turn it off in System Settings → Keyboard → Text Input → Input Sources → Edit… by unchecking Use smart quotes and dashes. For a one-off, press ⌘Z immediately after the substitution and it reverts to what you typed. Check the Text Replacement list in the same panel while you're there — a stale entry from years ago will happily rewrite a word you never meant it to.

Keys that stick, repeat, or need holding

Two accessibility features live in System Settings → Accessibility → Keyboard. Slow Keys requires each key to be held before it registers, so light presses vanish. Sticky Keys lets you press modifiers one at a time instead of holding them — and if you double-press Shift it can latch on, so everything types in capitals until you press it again.

Separately, if and behave as though they're swapped, check System Settings → Keyboard → Keyboard Shortcuts… → Modifier Keys. That mapping is set per keyboard, so an external board can be remapped while the built-in one is untouched. There's a Restore Defaults button in the same sheet. We cover the deliberate version of this in how to remap keys on a Mac, and the PC-keyboard-on-a-Mac case in using a Windows keyboard on a Mac.

When it really is the hardware

Hardware is the last suspect, not the first. Three checks settle it:

  1. Keyboard Viewer shows a different key lighting up than the one you pressed, consistently, in every app.
  2. The same keys misbehave on the login screen, before your settings load.
  3. A second keyboard doesn't reproduce it.

If all three point the same way, it's the keyboard — usually debris or liquid under a specific key rather than a dead board. Clean it per Apple's instructions before replacing anything.

Frequently asked questions

Why did my Mac keyboard suddenly start typing wrong characters?

Something changed a setting, not the hardware. The usual culprits are an accidental Control-Space (input source), five taps of Option (Mouse Keys), or a new external keyboard triggering Keyboard Setup Assistant while you weren't paying attention.

How do I reset my Mac keyboard settings to default?

There's no single reset. Work through the layers: remove extra input sources, turn off Mouse Keys, Slow Keys and Sticky Keys, and use Restore Defaults in the Modifier Keys sheet. Resetting NVRAM only helps on Intel Macs, and not for character mapping.

Does an external keyboard use different settings than the built-in one?

Partly. Modifier key mapping and keyboard type are stored per device, so fixing one keyboard doesn't fix the other. Input sources, dead keys and text substitutions are system-wide.

My characters are right but shortcuts don't fire. Same problem?

No — that's a different layer. A shortcut that does nothing usually means two apps claimed the same chord. Start with Mac keyboard shortcut conflicts instead.


Once the keyboard tells the truth again, it's worth getting more out of it. If you spend your day pushing windows around with a mouse, a keyboard-first window workflow is the highest-return habit on a Mac — Let's Tile arranges windows from a visible grid and Let's Switch jumps to any open window with Option-Tab. Both are free to use, and neither of them touches your keyboard layout.