Keyboard & Typing guide

Why Does My Keyboard Type the Wrong Characters?

Identify language-layout mismatches, modifier states, Num Lock behavior and application-specific shortcuts.

By 3 minute readPublished 2026-08-27Reviewed 2026-08-27

Quick answer

What this guide helps you determine

Identify language-layout mismatches, modifier states, Num Lock behavior and application-specific shortcuts.

Begin with the observable browser result, repeat it under the same conditions, and change one connection, setting or application at a time. A browser result narrows likely causes but does not certify hardware or decide a repair.

Scope of this check

When a key creates the wrong symbol, the switch usually worked: the browser received a physical position and the active input system translated it differently. Common causes include an unintended language switch, ANSI/ISO layout mismatch, Num Lock, modifier state, IME composition or a remapping profile.

Step-by-step method

  1. Compare KeyboardEvent.code with KeyboardEvent.key. If code matches the physical position but key is unexpected, check the operating-system language indicator and switch back to the intended layout.
  2. Release Shift, Alt, AltGraph and Control, then test again. On laptops and compact boards, verify Fn-layer and Num Lock behavior. Finish or cancel any active IME composition before reading a final character.
  3. Open a plain text editor and disable application-specific shortcuts, extensions or remapping profiles. If several keyboards produce the same wrong character on the computer, the input configuration is the more likely cause.

What to check first

Use these checkpoints to keep the comparison focused. Record the visible behavior rather than assigning a fault label too early.

Open Key Code Tester

How to read what you see

ObservationWhat it can suggestUseful next check
code matches but key is another symbolThe physical position registered and the active layout translated it.Select the intended keyboard language/layout.
Only number-pad keys act like navigationNum Lock is off or an accessibility option changed keypad behavior.Toggle Num Lock and review mouse-keys settings.
One application changes the characterAn app shortcut, macro, extension or custom input method is involved.Reset or disable that application’s mapping.

Common mistakes to avoid

Build evidence another person can use

Write down the exact action, visible result and whether it repeats. Include the browser family, operating-system family, connection type and the single comparison that changed the result. Quote the observation directly—for example, “code matches but key is another symbol”—then add where it occurred and which comparison changed it.

Change one condition per comparison and return settings that have no effect. Follow model-specific manufacturer instructions before firmware changes, cleaning, disassembly or warranty action.

When to seek qualified support

If the same problem remains in multiple applications and on another compatible connection or computer, collect the repeatable observations and contact the manufacturer or a qualified technician. Stop using equipment that is physically damaged, unusually hot, wet, sparking or unsafe. Device Test Bench cannot inspect electrical condition or make a repair decision.

Privacy during testing

Our public tests process key events, pointer values, media streams and controller input locally. Do not send private recordings, complete typed text or device identifiers when asking for help. A short description of the behavior, browser and page URL is normally enough.

Questions readers ask

Why are @ and quotation marks swapped?

That is a common sign that the active US and UK layout does not match the printed keyboard.

Is event.code always the printed label?

No. code represents a standardized physical position, while key describes the produced value under the current layout.

Primary technical references

The following specifications define the browser APIs discussed in this guide. They are primary web-platform references, not product repair manuals.

Published 2026-08-27 · Last reviewed 2026-08-27

Search