Why is my keyboard typing the wrong characters?

Updated October 2026 · TapTest guides

Few keyboard problems are as baffling as pressing one key and getting a different character, or pressing the quotation mark and getting an at sign. The good news is that this almost never means your keyboard is broken. In the large majority of cases the hardware is perfectly fine and the computer has simply been told to interpret the keys differently. That means the fix is usually a setting, not a new keyboard.

The quickest way to prove this to yourself is to open the keyboard tester and press the key that is misbehaving. The tester shows the physical key you pressed by its hardware position. If the correct physical key lights up but the wrong character appears when you type normally, the keyboard is doing its job and the problem is in the software layer that maps keys to characters.

The most common cause: the wrong keyboard language

By far the most frequent reason for wrong characters is a mismatched keyboard layout in the operating system. The classic symptom is the at sign and the quotation mark swapping places, which is the tell-tale sign that a US layout has been selected on a UK keyboard or the other way round. Other symptoms include the pound or euro sign appearing in the wrong spot, the backslash and hash moving, or accented characters showing up unexpectedly.

This happens easily because most systems let you switch layouts with a keyboard shortcut, and it is simple to trigger that shortcut by accident. On Windows the combination is often Alt and Shift, or the Windows key and the space bar, and once pressed it quietly swaps your active layout.

Fixing the layout on Windows

Open Settings, go to Time and Language, then Language and Region. Look at the list of installed languages and the keyboard layouts under each. The fix comes in two parts. First, make sure the correct language is set as the default. Second, and this is the step people miss, remove any extra layouts you do not use, because as long as a wrong layout is installed, a stray shortcut can switch back to it. If you only ever type in UK English, having only the UK English keyboard installed removes the problem at its source.

It is also worth checking the small language indicator in the taskbar near the clock. If it shows something unexpected like ENG US when you expect ENG UK, click it and choose the right one. That single click often fixes the symptom instantly, and cleaning up the installed layouts stops it coming back.

Fixing the layout on macOS

Open System Settings, go to Keyboard, and look at Input Sources (sometimes called Text Input). Add the layout that matches your physical keyboard, such as British, set it as the one you want, and remove any input sources you do not use. macOS shows a flag or code in the menu bar for the active input source, and clicking it lets you switch, so if characters are wrong, that menu is the first place to look.

Num Lock and the number pad

If the wrong characters are specifically on the number pad, with numbers typing arrow movements or nothing at all, the cause is Num Lock being switched off. Press the Num Lock key once and the number pad should return to typing digits. On compact laptops without a dedicated number pad, a function layer can turn part of the letter area into a number pad, and an accidental Fn lock can make letters type numbers. Look for an Fn or F Lock key and toggle it.

AltGr, dead keys and accidental modes

Some layouts use the right Alt key, labelled AltGr, to produce extra symbols, and a few also use dead keys, where you press an accent key and then a letter to combine them. If an accent appears before your letters, or a key seems to do nothing until you press another, you are hitting dead keys from a layout meant for a language with accents. Switching to the layout that matches how you actually type clears this up.

When a specific key always types the same wrong thing

If the misbehaviour is isolated to one key that consistently produces one wrong character, and the tester confirms the right physical key is being detected, the culprit may be a remapping tool left over from earlier. Check whether anything like PowerToys, SharpKeys, Karabiner or a gaming utility has a remap set for that key, and clear it. Our guide on remapping keys covers where these tools store their settings.

When it really is the hardware

Hardware is the cause in a minority of cases, and the tester makes it obvious. If you press one key and the tester lights up a different physical key, or shows two keys at once, or shows nothing, then the keyboard itself has a fault such as a short under the keys, often from a spill. In that situation, start with our guide on a key that is not working and consider a clean, since sticky residue under the keys can bridge contacts and cause exactly this kind of cross-talk.

A quick checklist

Common questions

Why did my at and quote keys swap? That is the signature of a US layout active on a UK keyboard, or the reverse. Switch to the layout that matches your physical keyboard.

I never changed any setting, so why did this happen? A keyboard shortcut like Alt and Shift can switch layouts by accident. Removing the layouts you do not use prevents it.

Could a virus be doing this? It is very unlikely. The layout and Num Lock explanations cover almost every case, so rule those out first before worrying about anything sinister.

More guides