Testing a keyboard in the browser — a simple keyboard test that shows the key and its code
Testing a keyboard in the browser — a simple keyboard test that shows the key and its code If a key stops working, the search most people type is keyboard test (or “testing a keyboard”). Before you buy a replacement, i
Testing a keyboard in the browser — a simple keyboard test that shows the key and its code
If a key stops working, the search most people type is keyboard test (or “testing a keyboard”). Before you buy a replacement, it helps to know whether the key is really silent, or whether the operating system and the app are just not doing what you expect.
I built a small browser tool for this at DangNH Studio. This post is the practical version of that work: what to check, how to read the result, and where a page like this cannot help.
Why a browser keyboard test is useful
You do not need to install a driver utility for a first pass. Open a page, click into it, and press keys. If the page sees the key, the signal is reaching the computer and the browser. If it never appears, the problem is more likely the switch, the cable, the receiver, or a filter at the OS level.
On 04/12/2026 the live tool at dangnhstudio.com does a simple thing, which is also the thing I want from a test: press a key, and the page lists the key and its code. Nothing to install.
Key versus code
Two labels show up in a useful keyboard test, and they are not the same:
-
key is usually the character or the named key, after layout and modifiers. On a US layout, the key next to left Shift often reports as
Z. On an AZERTY layout it may report asW. Shift+1 may report as!. -
code is the physical position, in the UI Events KeyboardEvent code values sense. That same bottom-left letter key is
KeyZeven if your layout prints another letter there. Left Alt and Right Alt have different codes (AltLeft,AltRight).
That split is why a keyboard test is better than typing into a notes app. A notes app only shows the character. If Right Alt does nothing in a game, you want to see whether AltRight is firing at all.
A short checklist
- Click the test page so it has focus. A key pressed while the address bar is focused will not show up.
- Press the key you care about, then the ones next to it, then both Shifts, both Alts, both Controls, and the menu / application key if you have one.
- If you use a laptop function row, try the key with and without Fn. Many “dead” volume or brightness keys are just Fn-lock.
- If you use a language layout or a custom remap (PowerToys, Karabiner, AutoHotkey, a layer on a programmable board), test once with the remap off. Otherwise you are testing the remap, not the keyboard.
- On a wireless board, reseat the dongle or try a cable if the same keys drop in every app, not only in one game.
How to read the result
- The key and its code appear every time you press it. The hardware path to the browser is fine. Look at the app, the game’s keybinds, or an accessibility filter.
- Nothing appears. Treat it as a hardware or OS input issue first: another keyboard, another USB port, a wired connection, or the OS keyboard viewer.
- The code is stable but the key character looks “wrong”. That is often layout, not a defect. Check the language and input source in the OS.
I do not log or invent a pass/fail score in this post, because a single missed event is enough to tell you something is off, and a page cannot prove a switch is healthy in every application.
What this kind of tool cannot do
A browser keyboard test cannot reflash firmware, cannot see a key that the OS never delivers, and cannot replace opening the case on a mechanical board. It is a first diagnostic, not a repair.
The tool
If you want to try the one I maintain, it is here:
Testing a Keyboard — DangNH Studio
Press a key; the page lists the key and its code. I also make small Android apps under the same name, but this particular tool is the in-browser keyboard test.
Originally published by Dev.to WebDev. Aggregated on AIWithGhost for educational purposes — full credit and traffic to the original publisher.