You press a key marked with one character, but a different character appears on screen. Perhaps @ and " seem to have swapped places, punctuation has moved, or familiar letter keys no longer produce the letters you expect. It can look like a faulty keyboard, but the hardware is often working exactly as intended.
The missing piece is the keyboard layout. A keyboard sends information about which key was pressed; software then interprets that key according to the active layout. If the software layout does not match the physical labels on the keyboard, the result on screen can differ from what is printed on the keycap.
Understanding that separation makes this problem much easier to diagnose and explains why the same keyboard can behave differently on another computer, after a language change, or even between user sessions.
The keycap is a label, not the character itself
It is natural to imagine that pressing the A key makes a keyboard send the letter A. Modern keyboards generally work at a lower level than that.
When you press a key, the keyboard reports a key position or usage to the computer through its input protocol. The operating system and application then use that input, together with the active keyboard layout and modifier keys, to decide which character or action it represents.
A simple mental model is to separate the process into two parts:
- The physical keyboard reports which key was pressed.
- Software decides what that key means in the current layout.
The printed symbol on the keycap is there for the person using the keyboard. It does not force the operating system to interpret that position in one particular way.
That is why changing a keyboard layout can change what appears on screen without changing the keyboard itself.
A keyboard layout maps key positions to characters
A keyboard layout is a set of rules that maps keys and key combinations to letters, numbers, punctuation, and other characters.
Different layouts can use the same physical key positions differently. Even layouts that look almost identical can disagree about punctuation and symbols. For example, keyboards intended for different English-speaking regions may place some symbols differently. Other layouts rearrange letters more substantially.
Modifier keys add another layer. Holding Shift, AltGr or another modifier can select a different character assigned to the same key. The exact modifiers and available characters depend on the layout and operating system.
This explains a common symptom: ordinary letters may work normally while a few punctuation keys produce unexpected symbols. The keyboard is still reporting the correct physical keys, but the active layout assigns different characters to those positions.
Physical keyboard layout and software layout are separate choices
The physical layout describes the keys you can see and their printed legends. The software layout is the mapping currently selected by the operating system.
They often match because a computer is configured for the keyboard sold with it. They do not have to match.
Imagine connecting a keyboard whose keycaps follow one regional layout to a computer configured for another. Pressing a punctuation key sends the same physical key information as before. The computer then interprets that position using its configured layout, not by reading the symbol printed on the key.
The same thing can happen on a laptop if the input language or keyboard layout is changed accidentally. Nothing has physically moved, yet several keys appear to have changed function at once.
This distinction is useful when troubleshooting because a layout mismatch usually creates a consistent pattern. The same key tends to produce the same unexpected character each time.
Why the layout can change unexpectedly
Operating systems commonly support multiple input languages and keyboard layouts because people may type in more than one language or use different keyboards with the same device.
When several layouts are enabled, the system usually provides some way to switch between them. The exact controls, indicators, and shortcuts vary by operating system and version. A shortcut can therefore change the active layout without the user deliberately opening a settings page.
Layout changes can also appear after setting up a new device, connecting a different keyboard, changing language preferences, signing into another user account, or restoring settings. The details are platform-dependent, so it is better to check the current input layout than to assume a particular cause.
Some applications also provide their own input behaviour for specialised tasks, although ordinary text entry usually follows the operating system’s active layout.
Wrong characters are different from missed or repeated keystrokes
A layout mismatch is only one possible keyboard problem. The pattern of the failure matters.
If pressing one key reliably produces another valid character, especially when several affected keys correspond to another known layout, software configuration is a strong possibility.
Hardware problems tend to look different. A worn or contaminated switch might fail to register, register intermittently, or produce repeated presses. A damaged connection can cause broader reliability problems. Some keyboards also have programmable layers or remapping features that intentionally change what keys do.
That means “the wrong character appears” and “the key does not work properly” are not quite the same diagnosis.
There is another useful clue: if the keyboard behaves correctly on one device but produces consistently different characters on another, the physical keyboard is less likely to be the cause. The software configuration on the second device deserves attention first.
Keyboard layouts do not change the language of existing text
Changing the active keyboard layout affects how future key presses are interpreted. It does not translate text that is already in a document.
If you typed a sentence while the wrong layout was active, switching layouts afterward does not normally transform those existing characters into what you meant to type. The document already contains the characters that were entered.
The layout also does not determine the language of every application or menu. Display language, spell-checking language, regional formats, and keyboard input can be separate settings. Their names and grouping vary between platforms.
This is why changing a device’s display language is not necessarily the right fix for a keyboard mapping problem. The setting that matters is the active input or keyboard layout.
What to check when keys produce unexpected characters
Start with the pattern rather than changing several settings at once.
Open a simple text field and press a few affected keys individually. If the result is repeatable, check which keyboard or input layout the operating system says is active. Look for an input-language or keyboard indicator if your platform provides one. Menu names vary, so there is no single universal path.
Then compare the selected layout with the physical keyboard you are using. If several layouts are enabled and you never use some of them, removing unnecessary choices can reduce accidental switching. Keep layouts you genuinely need.
If the software layout already matches the keyboard, consider other explanations. Check whether the device or keyboard software supports key remapping, macros, alternate layers, or accessibility features that alter input. Testing the keyboard in another application can also show whether the behaviour is system-wide or limited to one program.
For an external keyboard, testing it on another device can help separate hardware from software. If the same physical key behaves incorrectly everywhere even when the layouts are known to match, a hardware or keyboard-firmware issue becomes more plausible.
Some keyboards deliberately have more than one meaning per key
Not every mismatch is an error. Compact keyboards often give keys secondary functions to save space. A key might act as a letter normally and perform navigation, media control, or another command when a function layer is active.
Programmable keyboards can go further by allowing users to remap positions or create multiple layers. In those cases, the keyboard itself may transform input before the operating system receives it.
Laptop keyboards can also use function-key modes that change whether the top row behaves primarily as traditional function keys or as controls for brightness, volume, and other device features. That behaviour is related to key mapping, but it is separate from the character layout used for normal typing.
Keeping these cases separate avoids a common mistake: changing the operating system’s language layout when the unexpected behaviour actually comes from a keyboard layer or remapping feature.
Use the pattern to find the right layer of the problem
When a keyboard types the wrong characters, do not start by assuming the keys are broken. First ask whether the computer may simply be interpreting those key positions with a different layout.
A consistent substitution of letters or symbols points toward layout or remapping settings. Missing, intermittent, or repeated presses point more strongly toward a different kind of input problem. Testing the same keys in another application or on another device can narrow the cause further.
The practical idea is simple: the keyboard reports a press, while software decides what that press means. Once those two jobs are separated, a keyboard that suddenly seems to have “moved” its characters becomes much less mysterious.