Wrong characters almost always mean the operating system is using a keyboard layout that does not match the keys in front of you. Windows and macOS both let several layouts coexist and switch between them with shortcuts that are easy to press by mistake. Fixing it is a matter of finding the active layout and removing the ones you do not need.
Identify the layout from the symptom
| You press | You get | Active layout |
|---|---|---|
| Shift+2 | “ | United Kingdom |
| Shift+’ | @ | United Kingdom |
| Q, W, A, Z | A, Z, Q, W | French (AZERTY) |
| Y, Z | Z, Y | German or Swiss (QWERTZ) |
| Whole alphabet scrambled | Dvorak or Colemak | |
| Letters | Cyrillic, Greek, Arabic, Hebrew | A non-Latin language |
| ’ then e | é | US-International dead keys |
| 8 on the numpad | Up arrow | Num Lock off |
The tester above shows exactly which character each key produces, so you can compare against the table.
Windows: find and fix the layout
Switch quickly
Press Win+Space. A panel lists every installed layout; keep pressing Space to move down the list. Alt+Shift and Ctrl+Shift also switch layouts in most setups. If the wrong characters stop, you simply had the wrong one selected.
Remove layouts you do not use
- Open Settings → Time & Language → Language & region.
- Click the three dots beside your language → Language options.
- Under Keyboards, remove every layout except the one that matches your physical keyboard.
- If a whole language you never use is listed, remove it too.
With one layout left, the switching shortcuts have nothing to switch to.
Stop the shortcut
If you want two layouts but not accidental switching, go to Settings → Time & Language → Typing → Advanced keyboard settings → Input language hot keys, select Switch Input Language, click Change Key Sequence and set it to Not Assigned or a combination you will not hit by mistake.
Set a layout per app or for all windows
Under Advanced keyboard settings, the option Let me use a different input method for each app window is often what makes the layout appear to change randomly. Turn it off so every window uses the same layout.
Mac: input sources
- Open System Settings → Keyboard → Input Sources → Edit.
- Remove input sources you do not use; keep the one matching your keyboard. U.S., British, and ABC are the common ones. A Windows-style UK keyboard plugged into a Mac wants British – PC.
- Turn on Show Input menu in menu bar so you can see and switch the layout at a glance.
Control+Space cycles input sources. If Spotlight opens instead, the shortcut has been reassigned; check System Settings → Keyboard → Keyboard Shortcuts → Input Sources.
Chromebook
Press Ctrl+Space to switch between input methods, or open Settings → Device → Keyboard → Change input settings and remove the extra ones.
Dead keys and the US-International layout
The US-International layout is popular with people who type accents. It turns five keys into dead keys: ’ ` ^ ~ “. Press one, and nothing appears until you press the next letter, which then gets the accent. Press Space after the dead key to type the plain symbol.
If quotes are vanishing or letters are gaining accents you did not ask for, you are on US-International. Switch to plain US if you do not need accents, or learn the combinations on the accent keyboard if you do.
When the layout is right but you need a character it lacks
Every layout is missing something. Instead of switching layouts for one symbol:
- Alt codes on the numeric keypad, for example Alt+0233 for é. The Alt codes finder lists them.
- Win + . opens the emoji and symbol panel on Windows 10 and 11.
- Alt+X in Word: type the Unicode hex code, then Alt+X. Every symbol page here shows the code.
- Unicode hex input on a Mac: add the Unicode Hex Input source, then hold Option and type the four-digit code.
- Copy it from Copy and paste symbols or the language keyboards, such as the Spanish keyboard.
Not a layout problem after all
If the tester shows keys sending unrelated or random characters, or the same key sends different things each time, it is not the layout:
- Turn off Sticky Keys and Filter Keys under Accessibility.
- Reinstall the keyboard driver in Device Manager and restart.
- Check for a remap in PowerToys, Karabiner or gaming keyboard software.
- Consider liquid damage or a loose laptop keyboard cable. Keys not working on a laptop covers the hardware side.
Troubleshooting flow
- Read what the tester shows and match it to the table above.
- Switch layouts: Win+Space, Control+Space or Ctrl+Space.
- Remove unused layouts and languages.
- Disable the switching shortcut or the per-window setting.
- Leave US-International, or press Space after dead keys.
- For one-off symbols, use Alt codes, Win + ., Alt+X or copy.
- Random output: Sticky Keys, driver, remap, hardware.
Related
- @ key not working or typing “
- Keyboard typing symbols instead of letters
- How to change keyboard language in Windows
- How to change keyboard language on a Mac
Frequently asked questions
Why did my keyboard layout change by itself? +
Windows switches layouts with Alt+Shift, Win+Space or Ctrl+Shift, and some apps remember a layout per window. Remove the layouts you do not use so there is nothing to switch to.
How do I stop Alt+Shift from changing my layout? +
Settings → Time & Language → Typing → Advanced keyboard settings → Input language hot keys. Change or disable the Switch Input Language key sequence.
What does the US-International layout do? +
It adds dead keys so that ' ` ^ ~ and " combine with the next letter to make accented characters such as é or ñ. Press Space after the dead key to get the plain symbol.
How do I type a character my layout does not have? +
Use an Alt code on the numpad, the Win + . symbol panel, Alt+X with the Unicode hex code in Word, or copy it from the symbol's page on this site.
Does the Mac have a language bar? +
The input menu in the menu bar does the same job. Turn it on under System Settings → Keyboard → Input Sources → Show Input menu in menu bar.