If your keyboard suddenly types " when you press @ (or the other way around), your keyboard is fine. Your operating system switched to a different keyboard layout, almost certainly because you hit a shortcut like Win + Space or Alt + Shift without noticing. Switching back takes about ten seconds once you know where to look. If letters are coming out as numbers instead, that is Num Lock. If accented characters appear when you type apostrophes, that is the US International layout. All three are settings, not damage.
We will fix the common cases first, then cover the rare situations where the hardware really is the problem.
Why your keyboard "changed" overnight
Your physical keyboard sends key codes, not characters. The operating system decides what character each key code produces, based on the active keyboard layout. A US layout puts @ on Shift + 2. A UK layout puts " there and moves @ next to Enter. German layouts swap Y and Z. French layouts (AZERTY) rearrange half the alphabet.
Windows and macOS both let you install multiple layouts and hop between them with a keystroke. That is genuinely useful if you type in two languages. It is a trap for everyone else, because the switching shortcuts sit right next to combinations you use all day. Win + Space cycles layouts on Windows. Alt + Shift and Ctrl + Shift can do it too, depending on settings. On a Mac, Ctrl + Space or Cmd + Space can be bound to input source switching. One slip during a copy-paste session and every symbol key is suddenly lying to you.
The giveaway pattern: letters are correct, but symbols and punctuation land in the wrong places. That is a layout mismatch, full stop. The keyboard prints US legends on the keycaps while the OS interprets them as UK, or vice versa.
The fix, in order
Work through these in order and stop when your @ comes home.
- Press Win + Space and watch the screen. On Windows, this cycles through installed layouts and shows a small overlay listing them. If two or more appear, cycle until the correct one (for most US keyboards, "ENG US") is selected, then test the @ key in a text field.
- Check the language indicator in the taskbar. Near the clock, Windows shows an abbreviation like ENG or an input badge when multiple layouts are installed. Click it and pick the layout that matches what is printed on your keycaps.
- Remove the layouts you never use. Open Settings, search for "language", and open your language options. Under the keyboard section, delete every layout except the one matching your physical keyboard. No spare layouts means no accidental switching, ever.
- Check Num Lock if letters type as numbers. On compact laptop keyboards, Num Lock turns part of the letter area (U, I, O, J, K, L, M) into a phantom number pad. Press Num Lock, or Fn + Num Lock, or Fn + F11 depending on the model, and try again.
- Check the Fn lock if function keys act wrong. If F5 refreshes nothing but mutes your speakers, the Fn lock is toggled. Most laptops use Fn + Esc or a dedicated FnLock key to flip it back.
- On a Mac, check Input Sources. Open System Settings, search for "input sources", and remove any layout you did not add on purpose. Also look at the menu bar for a flag or "ABC" icon, which switches layouts with one click.
- Turn off Sticky Keys and Filter Keys if keys repeat or lag. These accessibility features activate from holding or tapping Shift repeatedly, which happens by accident more than you would think. Search Settings for "sticky keys" and disable both if you did not enable them deliberately.
- Test in a clean context. Open a plain text editor and type the problem characters. If they are correct there but wrong in one specific app, that app has its own input or autocorrect setting (looking at you, text replacement rules and browser extensions).
For most people this ends at step 3. Deleting unused layouts is the actual cure. Everything before it is first aid.
Do not start prying keycaps off or spraying cleaner into the keyboard because characters come out wrong. Wrong characters are a software symptom. Physical cleaning fixes sticky or dead keys, not swapped ones, and snapped keycap clips turn a free fix into a paid one.
Symptom to cause, at a glance
| What you see | Actual cause | Where to fix it |
|---|---|---|
| @ and " swapped, # or £ wrong | US layout vs UK layout mismatch | Language / layout settings |
| Letters U, I, O, J, K, L type numbers | Num Lock on (laptop phantom numpad) | Num Lock or Fn + Num Lock |
| Typing ' or " produces é, ü, ñ | US International layout (dead keys) | Switch to standard US layout |
| Y and Z swapped | German (QWERTZ) layout active | Language / layout settings |
| Whole rows dead or garbage characters | Hardware, liquid damage, or driver | See the hardware section below |
| Keys repeat, lag, or need long presses | Filter Keys / Sticky Keys enabled | Accessibility settings |
If your symptom is in the top four rows, you are two clicks from done. The bottom two rows deserve their own sections.
The US International trap
The US International layout deserves a special mention because it looks identical to regular US until you type punctuation. It uses "dead keys": pressing ' or " outputs nothing at first, then combines with the next letter to make an accented character. Great for typing Spanish or Portuguese. Baffling if you did not ask for it.
The tell is that apostrophes vanish until you press another key, and typing "a immediately after gives you ä. If that matches what you are seeing, go back to your language settings and swap US International for plain US. Windows sometimes adds International as a suggestion during setup or after a language pack install, so people who never chose it end up with it anyway.
When it really is the hardware
A layout problem swaps characters cleanly and consistently. Hardware problems look different: a whole row goes dead, one key needs three presses, random characters appear without input, or the keyboard works in some moods and not others.
Quick triage:
- Try another keyboard, or try this keyboard on another computer. Ten minutes with a borrowed keyboard answers the hardware-or-software question definitively. This is the same swap-test logic from our universal troubleshooting checklist, and it saves hours of guessing.
- For USB keyboards, change the port. A flaky port or hub produces flaky input. If the keyboard is not detected at all, that is a different problem with its own guide covering a USB device that is not recognized.
- For wireless keyboards, replace the batteries and re-pair. Low batteries cause dropped and repeated keystrokes long before the keyboard dies completely.
- After a liquid spill, stop typing. Unplug it (or power the laptop off), turn it upside down, and let it dry for a day or two. Keys that survive a spill but type wrong characters usually have shorted traces, and that keyboard is on borrowed time.
Driver problems sit in between. If Windows shows an error about the keyboard device, do not just dismiss it. Error text usually names the actual problem, and knowing how to read an error message turns "keyboard broken??" into "HID driver failed to load", which is searchable and fixable. Uninstalling the keyboard device in Device Manager and restarting makes Windows reinstall the driver fresh, which clears most driver-level weirdness.
Stop it from happening again
Prevention here is unusually easy:
- Keep exactly one layout installed unless you genuinely type in multiple languages. No second layout, no accidental switch.
- If you need two layouts, change the hotkey. Windows lets you disable or reassign the layout-switching key sequence in the advanced keyboard settings. Move it to something you will never hit by accident.
- Match your layout to your keycaps when buying. If you buy a laptop abroad, you inherit its physical layout. The OS can remap it, but your fingers and the printed legends will disagree forever.
- Know the Num Lock indicator on your laptop. Some laptops have a tiny LED, some show an on-screen badge, some show nothing. Find out which yours is now, while nothing is wrong.
Frequently asked questions
Why does my keyboard type " instead of @?
Your operating system is using a UK keyboard layout while your physical keyboard is US (or the reverse). The two layouts swap the @ and " positions. Switch the active layout in your language settings, then remove the layout you do not use so it cannot come back.
How do I switch my keyboard back to normal?
On Windows, press Win + Space to cycle installed layouts, or click the language abbreviation near the clock. On a Mac, use the input menu in the menu bar or System Settings under input sources. The permanent fix is deleting every layout except the one that matches your keyboard.
Why is my laptop typing numbers instead of letters?
Num Lock is on. Compact laptop keyboards overlay a number pad on the U-I-O, J-K-L, and M keys, and Num Lock activates it. Press Num Lock (often with the Fn key held) to turn it off.
My apostrophe key does nothing until I press another key. Why?
You are on the US International layout, which uses dead keys to build accented characters like é and ü. Pressing ' waits for a letter to combine with. Switch to the standard US layout in your language settings unless you actually want accents.
Can a virus make my keyboard type wrong characters?
It is technically possible (keyloggers interfere with input) but it is almost never the cause. Layout switches, Num Lock, and accessibility settings explain nearly every real-world case. Rule those out first; they take two minutes, and a malware hunt takes an afternoon.
Do I need new drivers for my keyboard?
Usually not. Standard keyboards use a generic driver that ships with the OS and rarely breaks. Reinstalling it (uninstall in Device Manager, then restart) is worth trying only after you have ruled out layouts and locks, or if the system reports a device error.
When to stop and swap it
Give the software fixes ten minutes: cycle layouts, kill Num Lock, delete unused layouts, test in a plain text editor. That resolves the overwhelming majority of wrong-character complaints without spending anything.
If characters are wrong in ways no layout explains, if keys are dead or intermittent, or if there was ever a spill, the keyboard itself is suspect. External keyboards are cheap enough that replacement beats repair. Laptop keyboards are a repair-shop job, but a USB or Bluetooth keyboard gets you typing again today while you decide whether the fix is worth it. Either way, you now know the difference between a keyboard that is broken and one that is just speaking the wrong language.
