If your Mac types the wrong symbols even though the keys physically work, check the selected input source before assuming the keyboard is broken. A US, British, Polish, German or other keyboard layout can map the same physical key to a different character. macOS lets you review input sources in System Settings and use Keyboard Viewer to see exactly what each key should type with Shift or Option.
First check whether the problem affects every app
Open a simple text field in another app and type the same keys. If the wrong symbols appear everywhere, the issue is likely system-wide. If it happens only in one application or document, check that app’s settings and the Mac option that can automatically switch to a document’s input source.
Apple allows macOS to remember an input source for individual documents when more than one source is enabled. This can make the keyboard appear to “change by itself” as you switch between documents.
Why @ and quotation marks can suddenly swap places
One of the most familiar examples is the difference between common British and US keyboard layouts. The physical keyboard may look normal, but if macOS is using a different layout from the one printed on the keys, symbols such as @, quotation marks, backslash and other punctuation can move.
The keyboard is still sending key presses correctly. The operating system is interpreting those presses through the selected layout.
Check Input Sources in System Settings
On current macOS versions, go to:
Apple menu → System Settings → Keyboard → Text Input → Edit
You will see the enabled input sources. Select each one to preview its layout. If you only use one physical layout, remove input sources you do not need or make sure the correct one is selected from the Input menu.
Do not remove a language source you actively use for typing in another script or language. The goal is to eliminate accidental switching, not to reduce language support you need.
Use Keyboard Viewer to see what macOS expects
Keyboard Viewer is one of the fastest diagnostic tools for this problem. Enable the Input menu in the menu bar if necessary, then choose Show Keyboard Viewer.
The on-screen keyboard displays the active layout. Press Shift, Option, or both to see how available symbols change. Compare the on-screen position with the legends printed on your physical keyboard.
If Keyboard Viewer shows that the @ symbol is on a different key than your physical keyboard, you have confirmed a layout mismatch.
Check shortcuts that switch input sources
If more than one input source is enabled, macOS can switch between them using a keyboard shortcut or the Fn/Globe key, depending on your settings.
If the layout changes unexpectedly while you type, review:
- the Fn or Globe key action,
- keyboard shortcuts assigned to input sources,
- the Input menu in the menu bar,
- the option to automatically switch to a document’s input source.
An accidental shortcut can explain a problem that seems intermittent.
Why the layout may change between documents
macOS includes an option called Automatically switch to a document’s input source. When enabled, one document can reopen with one input source while another uses a different source.
This can be useful for multilingual work, but confusing if you do not expect it. If the wrong symbols appear only after switching documents, this setting is worth checking.
Separate a layout problem from a failing key
A layout problem usually has a pattern: the key works, but produces a different valid character. A hardware problem is more likely when a key:
- does not respond at all,
- repeats unexpectedly,
- works only when pressed at an angle,
- produces intermittent input unrelated to layout changes.
Keyboard Viewer can help distinguish the two. If the viewer shows the correct mapping but the physical key does not trigger it reliably, the issue may be hardware, connection or keyboard-specific.
External Bluetooth keyboard? Check connection problems separately
If the wrong symbol is accompanied by disconnects, lag or failed reconnection, you may have two issues at once. See Bluetooth Mouse or Keyboard Keeps Disconnecting on Mac for connection troubleshooting.
A stable keyboard that consistently types the wrong symbol is more likely to have a layout mismatch than a Bluetooth problem.
Do not reset everything first
There is usually no need to delete preference files, reset the Mac or use Terminal for a symbol-mapping problem. Start with the reversible settings:
- Check the active input source.
- Preview the layout.
- Open Keyboard Viewer.
- Test Shift and Option combinations.
- Review input-source shortcuts.
- Test in a second app.
Only investigate deeper software or hardware issues if the mapping is correct and the problem remains.
Dictation and keyboard layout are different systems
If typed keys work but voice dictation does not insert text, that is a different issue. See Dictation Stops Working on Mac? for microphone, cursor and dictation troubleshooting.
Frequently asked questions
Why did @ and quotation marks change places?
Your Mac may be using a keyboard layout that does not match the physical keyboard, such as a different English regional layout.
Why does the keyboard layout change when I switch documents?
The option to automatically switch to a document’s input source may be enabled.
Does the wrong symbol mean the keyboard is broken?
Usually not if the key consistently produces another valid symbol. Check the input source and Keyboard Viewer first.
Where are Input Sources settings?
Go to Apple menu → System Settings → Keyboard → Text Input → Edit.
