Mechanical Keyboard Layout Diff

Paste two keyboard layouts and see every key that was added, removed or moved, shown side by side with a count for each change.

Compare two layouts

One key per line as Key: position, or a JSON object such as {"Q": "1,0"}. Use the same position format in both layouts.

Comparison results

Paste both layouts to compare them.

Key-by-key comparison of Layout A and Layout B
KeyLayout ALayout BChange

What Is the Mechanical Keyboard Layout Diff?

A mechanical keyboard layout diff compares two keyboard layouts key by key and reports what changed. Keyboard enthusiasts often want to know how a new layout differs from the one they know: which keys have moved, which have disappeared and which are new. Comparing two long lists by eye is tedious and easy to get wrong, especially when a layout uses a different grid or a function row. This tool reads both layouts, matches each key by name, and classifies it as unchanged, moved, added or removed. The result is a side-by-side table with a summary count, so you can see the full picture at a glance.

How to Use the Mechanical Keyboard Layout Diff

The comparison takes a few seconds once your layouts are written down. Follow these steps:

  1. Write Layout A in the first box, one key per line, in the form Key: position. Use names such as Esc, Tab, Caps or Q, and positions such as 1,0 for row 1, column 0.
  2. Write Layout B in the second box, using the same naming and position conventions.
  3. Read the summary line, which counts unchanged, moved, added and removed keys.
  4. Scan the table. Each row shows the key, its position in each layout and the change.
  5. Check the message panel for lines the tool could not read, such as a duplicate key or a malformed line, and correct them before trusting the result.

How It Works

The tool reads each layout as a map from key name to position. If the text starts with a curly bracket, it is read as JSON. Otherwise each line is split at the first colon or equals sign, so the left side becomes the key and the right side becomes its position. Duplicate keys are reported, and the first value is kept. Lines with no separator are skipped and named in the message, so one mistake does not hide the rest of the comparison.

The comparison then builds the full list of keys from both layouts. A key present in both layouts is compared on position. If the positions match, the key is unchanged. If they differ, the key is moved. A key found only in Layout A is removed, and a key found only in Layout B is added. The summary counts each category and shows the total number of distinct keys, so you can check that nothing was missed.

The table shows the position of each key in both layouts, or the words Not present where a key is missing. Because the labels state each change in words, the result does not depend on colour, which keeps it readable for everyone.

Worked Examples

Example 1: a small change. Layout A has Esc at 0,0, Q at 1,0, W at 1,1 and Tab at 1,2. Layout B has Esc at 0,0, Q at 1,0, W at 1,2 and Caps at 2,0. The summary reads 2 unchanged, 1 moved, 1 added and 1 removed. Esc and Q are unchanged, W has moved from 1,1 to 1,2, Caps has been added and Tab has been removed.

Example 2: JSON input. Layout A is written as {"Q": "1,0"} and Layout B as the line Q: 1,0. Both describe the same position for the same key, so the summary reads 1 unchanged and no other changes.

Example 3: a duplicate line. Layout A contains Q: 1,0 and then Q: 2,0 by mistake. The tool keeps the first value, 1,0, and reports the duplicate on line 2. Fixing the typo and running the comparison again gives a correct result.

Common Mistakes to Avoid

The most common mistake is mixing position conventions, such as using row and column numbers for one layout and coordinates in millimetres for the other. Positions must match in style, or every key will appear moved. Another is naming keys inconsistently, for example Enter in one layout and Return in the other, which shows as one removed key and one added key. A third is comparing a full-size board with a compact one and forgetting that the missing keys will be reported as removed. Finally, check the message panel, because a silently skipped line can make a key appear removed when it was simply mistyped.

Tips for Best Results

Use one naming convention for every key, and write it down before you start, so both layouts follow it. Choose a simple grid for positions, such as row and column, so changes are easy to read. Start with the keys you use most, then add the rest if you are documenting a full layout. Keep a copy of each layout as you finish it, so you can compare future versions. If you are sharing a comparison, copy the summary line and the table as text, so the result stays accurate when someone else reads it.

Documenting a layout you share

When you share a layout, include the summary line and the full key list rather than just a screenshot. Other people can then check the naming and positions, and they can run the comparison against their own layout. Note the naming style and the position grid at the top of the document, because a reader who assumes a different convention will see false moves. The comparison only sees the keys you enter, so say clearly if a layout omits the function row, the numpad or any modifier keys.

Frequently Asked Questions

What format should I use for a layout?

Write one key per line in the form Key: position, for example Q: 1,0. You can also paste a JSON object such as {"Q": "1,0"}. Positions can be any text, such as row and column numbers, so use the same convention for both layouts.

Why does a key show as moved?

A key is moved when it exists in both layouts but its position text is different. If you are comparing two physical layouts, the positions should use the same grid, so a move means the key sits in a different place on the board.

Can I compare layouts from different keyboard sizes?

Yes, but the comparison is only as good as the position data. Compact layouts often leave out keys such as the function row or the numpad, which will appear as removed. Check the key list before you read the summary.

Does the tool check firmware or key switches?

No. It compares only the key-to-position maps you enter. It does not read a keyboard, flash firmware or test switches.

Does the tool store my layouts?

No. The comparison runs in your browser, and the layouts you paste are not sent to ToolHuby. Save your own copy if you want to keep it.

By the ToolHuby editorial team. Last updated October 29, 2026.