Keyboard Layout Detector

Sample the browser's code-to-key mapping, compare five candidate character layouts, and review the leading layout, conflicts, and confidence. Operating-system settings are not read.

Layout sampling

Choose automatic detection or start manual sampling Manual mode asks for 12 physical keys in sequence. Tab remains available to leave the capture area.
Valid samples
0 / 12
Latest mapping
Samples remaining
12
Current phase
Waiting to start

Observed code → key

  • No code-to-key samples recorded yet.

Ready. The result uses only the mapping returned by this browser.

Result overview Waiting for samples
Likely character layout Ready. The result uses only the mapping returned by this browser.
Best match
Lead over second
Valid samples
Mapping conflicts

Use at least six distinguishing keys before interpreting the result; more samples make candidates easier to separate.

Five candidate layouts compared

Candidate match scores

  • Complete sampling to see the candidate comparison synchronized with the result.

After sampling, this area compares all five candidates using the same observed keys.

Learn more

Method, weights, and confidence

For each candidate, compare the actual key for the same KeyboardEvent.code with the candidate character. Score = matched weight ÷ observed weight × 100%. Codes that separate more candidates receive more weight. High confidence also requires enough samples, coverage, score, and a clear lead.

Scores and lead use unrounded values internally; the page shows one decimal place and confidence uses the original values.

Fixtures cover QWERTY, German QWERTZ, French AZERTY, Dvorak, and Colemak, including ties, too few samples, conflicts, case, composed characters, invalid keys, and custom candidates.

Scope and questions this cannot answer

The tool cannot read or prove the operating-system layout name and cannot identify ANSI, ISO, or JIS physical shape. Built-in mappings do not cover every regional variant, custom layout, or dead-key layer. Input methods, Caps Lock, remappers, remote desktops, virtual machines, and browser limits can affect the result; low confidence should remain inconclusive.

How do I tell QWERTY and QWERTZ apart?

Compare the characters produced by KeyY and KeyZ at the same physical positions. QWERTY commonly produces y then z, while German-style QWERTZ commonly produces z then y; use more distinguishing keys as well.

What is the difference between physical and character layout?

ANSI, ISO, and JIS describe the keyboard shape and key arrangement. QWERTY, AZERTY, Dvorak, and similar names describe the mapping from physical codes to characters. This tool compares the latter.

What if my browser cannot detect the layout automatically?

Choose Start manual sampling and press the physical keys shown in sequence. The tool compares their KeyboardEvent.code and key values using the same candidate models.

Privacy, sources, and implementation

All code-to-key samples, scores, and copied text stay in this browser. Nothing is uploaded, no remote runtime API is called, and no URL or local storage is used.

No third-party runtime code or assets are reused. The algorithm, tests, and interface are independently implemented; external links explain browser event and layout standards only.

Standards and method sources