Keyboard Typing Wrong Characters: How to Fix It
If your keyboard is typing the wrong letters or symbols, the usual cause is a changed keyboard layout or input language, Num Lock, or a stuck modifier key like Shift. The fastest fix is to check the active layout first, then test whether the problem follows a software setting or stays with the keyboard itself. If only a few keys are wrong, especially the number row or punctuation, that usually points to a layout mismatch rather than broken hardware.
What the wrong characters usually mean
The symptom often tells you where to look first.
Wrong letters or symbols appear when you typeThis usually shows up as soon as you start typing in a text field, after a restart, or right after you press a shortcut that changes input language or layout. If the number row is producing symbols, or punctuation seems swapped, the keyboard may be using a different layout than the one printed on the keycaps.
If the whole keyboard seems “shifted,” you might see letters in the wrong place, punctuation where you expect letters, or the number row typing symbols instead of numbers. A common example is pressing 2 and getting @, which is normal on some keyboard layouts but not others. Another common case is @ and " being swapped, or Y and Z appearing in the wrong place.
If only one key is wrong, that can mean the key is physically stuck, damaged, or contaminated. If several keys around each other are wrong, liquid or dirt under the keyboard is more likely. If the problem changes after a restart or after you tap a shortcut, software settings are more likely than hardware.
The key idea is this: a layout problem usually affects patterns of keys, while hardware trouble usually affects specific keys or comes and goes as you press them.
Is this a layout problem, a stuck key, or broken hardware?
Start by separating the problem into three buckets.
A layout or input-language problem is most likely when many keys are wrong in a way that matches a different country layout. For example, a US layout and a UK layout swap some punctuation, and QWERTY vs another layout can move letters around. This often happens after an update, a hotkey press, or switching languages by accident.
A stuck key is more likely when one key acts as if it is being held down. That can make other keys produce symbols, uppercase letters, or shortcuts. For example, a stuck Shift key can turn numbers into symbols, and a stuck Alt key can trigger odd menu behavior.
Hardware trouble is more likely when the same key misbehaves in every app, even before you sign in, or on an external keyboard connected to another device. Dirt, wear, liquid, wireless interference, and failing key switches can all cause wrong characters. If the built-in keyboard is fine in the sign-in screen but wrong in one app, the problem is probably software inside that app rather than the keyboard itself.
Before you start: These checks apply to Windows and macOS laptops and external keyboards. Most steps do not need administrator access, but changing system input settings may require you to be signed in. You do not need to reset the computer yet. First, test the keyboard in a plain text field, and if you use an external keyboard, unplug and reconnect it once.
Check the easy fixes first
Begin with the simplest causes, because they are the safest and fastest to reverse.
- Check whether the keyboard layout changed. Look for a language or keyboard indicator in the taskbar on Windows, or the input menu in the menu bar on Mac. If you see a different language or layout than usual, switch back.
- Try the keyboard shortcut that cycles layouts. On Windows,
Windows + Spaceoften switches input language. On Macs,Control + SpaceorFn + Control + Spacemay cycle input sources depending on your settings. If the wrong characters started right after a shortcut, this is often the cause. - Check Num Lock, especially on keyboards with a number pad. If Num Lock is off, some keys on the number pad may act like arrows or special functions instead of numbers. On some laptops,
Fncombinations control that state. - Look for a stuck modifier key. Tap
Shift,Ctrl,Alt,Option, andCommanda few times. If an on-screen keyboard or modifier indicator shows one of them as held down, that can explain the strange output.
If these quick checks fix the issue, the problem was almost certainly a setting or accidental shortcut, not damaged hardware.
Fix it on Windows
On Windows, the fix is usually in the language and keyboard settings, and you do not need to reinstall anything.
- Open keyboard language settings.
Settings > Time & language > Language & region- Check the language and keyboard list for the current language. Make sure the layout matches your physical keyboard. A US keyboard should usually use a US layout; a UK keyboard should use UK layout if that is what the key legends match.
- Remove the wrong keyboard layout or move the correct one to the top. If you see more than one keyboard under a language, remove the one you do not use, or make the correct one the default.
- Switch input language with the shortcut if needed. If the wrong layout got selected,
Windows + Spaceoften cycles to the right one immediately.
If your keyboard is typing @ where you expect ", or " where you expect @, that is a classic sign that a UK layout is active on a US keyboard, or the reverse. After you switch back, those keys should match your printed keycaps again. If they do not, check whether a modifier key is stuck and then test the keyboard in a plain text field before you assume the hardware is broken.
On some Windows versions, the settings names vary slightly, but the path still leads to language and keyboard options.
Fix it on Mac
On macOS, check input sources first, then keyboard settings.
- Open keyboard settings.
System Settings > Keyboard > Input Sources- Look at the active input source. If you see a language or layout you do not use, switch back to the one that matches your keyboard.
- Remove extra input sources if they keep coming back. Keeping only the layouts you actually use makes accidental switching less likely.
- Use the input menu in the menu bar if it is visible. You can usually change layouts there without digging through settings.
If the wrong characters appeared after you pressed a shortcut, that shortcut may have changed the input source rather than the hardware. If switching input sources fixes some keys but not all keys, test the keyboard in a different app or a simple text field. That helps separate a system setting from a problem limited to one app.
If your Mac keyboard types the wrong symbols only on an external keyboard, check whether that keyboard was made for a different layout region. The printed symbols on the keys should match the active input source as closely as possible.
If only a few keys are wrong
When just a few keys are off, the pattern matters.
If @ and " are swapped, or if the top number row produces symbols you do not expect, the active layout probably does not match the keyboard. That is the most common explanation when multiple punctuation marks seem “wrong” in a neat pattern.
If one punctuation key is wrong but nearby keys are fine, check whether the keyboard is physically dirty or whether that key is sticking. For example, a worn or jammed Shift key can make a number row look wrong because it changes the output of many keys at once.
If the number row is producing symbols and you expected numbers, check whether Shift is being held down, either physically or by accessibility settings. On some systems, a modifier lock or accessibility feature can make a keyboard behave as if a modifier key is stuck.
If a laptop key only works when pressed very hard, or repeats characters, that is usually not a layout issue. It points more toward a switch problem, debris under the key, or liquid damage.
The important clue is consistency. Layout mismatches usually affect the same letters and symbols every time. Hardware faults are messier: they can be intermittent, physical, or limited to one damaged key.
How to verify the keyboard is fixed
Test the keyboard in a plain text field so you can see the exact characters, not an app’s shortcuts or autocorrect.
- Open a text area where shortcuts will not interfere much, such as a blank note or document.
- Type the top row numbers, then the punctuation around them, then a few letters that were wrong before.
- Compare what appears on screen with the keycaps on the keyboard.
- If you use a web-based keyboard tester or an on-screen keyboard, check that each key produces the expected character and that no modifier key appears stuck.
If the output now matches the keys, the fix worked. If only one app still shows the wrong characters, the keyboard is probably fine and that app has its own input or shortcut setting. If the same wrong characters appear everywhere, move on to physical cleaning or hardware checks.
When the keyboard itself is the problem
If the layout is correct and the same keys still misbehave, the keyboard hardware is the next suspect.
Look for signs of dirt, crumbs, or dried liquid under the problem keys. Sticky or sluggish keys often point to contamination. On laptops, a spill can affect several nearby keys or make one key register only sometimes.
If you use a wireless keyboard, check the battery, re-pair it, and move it closer to the computer to rule out interference. Try it on another device if you can. If the wrong characters follow the keyboard to another device, that is strong evidence the keyboard itself is at fault.
Driver issues can also cause odd behavior, especially after an update. On Windows, reconnecting the keyboard, trying a different USB port, or restarting can clear a temporary driver issue. If the built-in keyboard on a laptop is wrong but an external keyboard works normally, that again points to hardware in the laptop keyboard rather than a system-wide software issue.
Cleaning can help if the keys are simply dirty. If a key cap is loose, cracked, or physically uneven, repair or replacement is usually the better path.
How to stop it happening again
A few habits make this problem less likely.
- Learn the shortcut that changes input language on your device, so you can switch back on purpose instead of by accident.
- If you never use extra layouts, remove them from Windows or macOS so they cannot be selected by mistake.
- Check the language indicator after system updates, because updates can sometimes change the active input source.
- Keep crumbs and dust out of the keyboard, and clean it gently before keys start sticking.
- Be careful with drinks around laptops and external keyboards, since liquid is one of the fastest ways to create weird key behavior.
These steps do not stop every hardware failure, but they do prevent the most common accidental layout changes and avoidable dirt problems.
When to get help or replace the keyboard
Stop troubleshooting when the same wrong characters keep returning after you have confirmed the correct layout, tested another app, checked modifiers, and cleaned the keyboard lightly.
Get help if liquid was spilled, if multiple keys are physically damaged, if a key cap will not sit properly, or if the keyboard behaves differently on different devices. Those signs usually mean the keyboard needs repair rather than another settings change.
Replacement makes more sense when the keyboard is old, repair parts are hard to find, or the cost of fixing it is close to the cost of a new keyboard. If it is a laptop keyboard and the damage is inside the machine, service is often the practical next step.
If the keyboard is still under warranty, keep any clean-up attempts gentle and avoid taking it apart before you check the warranty terms.
Conclusion
If the wrong characters appeared suddenly, check the keyboard layout and input language first, then Num Lock and stuck modifier keys. If the pattern is still wrong after that, test the keyboard in a plain text field or on another device so you can tell software from hardware. Once you know which one it is, either change the setting back or clean, repair, or replace the keyboard.
Frequently Asked Questions
Why is my keyboard typing symbols instead of numbers?
That usually means `Shift` is being held down, Num Lock is off, or the keyboard layout does not match the keyboard you are using. Check the active layout first, then test the number row and modifier keys.
Why are @ and " swapped on my keyboard?
That is a classic sign that the wrong keyboard layout is active, often US versus UK. Switch back to the layout that matches the printed keys on your keyboard.
How can I tell if the keyboard is broken or just misconfigured?
If many keys are wrong in a pattern, it is usually a layout problem. If one key or a small cluster is wrong everywhere you type, even after changing layouts, hardware or contamination is more likely.