Testing a Mac keyboard, and the macOS-specific things that trip people up
Mac keyboards are laid out and labelled differently enough from PC keyboards that a generic tester tends to confuse rather than help. The layout above uses the real arrangement: Command either side of the spacebar, Option outside it, Control at the far left, and the key marked Delete where a PC puts Backspace. The inspector shows which physical key sent each event alongside the modifier flags macOS set, which is what you need when a modifier seems to be sticking.
Two Apple-specific labels cause most of the confusion. The key marked Delete is Backspace — it deletes to the left, and forward delete is Fn plus Delete. Mac keyboards also have no Insert key at all, so if you are following instructions written for Windows, that key does not exist to test. Caps Lock behaves oddly on purpose too: macOS requires a slightly longer press before it engages, to stop accidental activation. A quick tap doing nothing is correct behaviour rather than a fault.
Being accurate about Command combinations, because the old version of this page overstated it: the page cancels Command shortcuts where a website is allowed to. Some are handled by macOS or the browser above the page and no website can block them — Command + Q and Command + W are the ones that will actually close things while you are testing. So test Command on its own to confirm the switch works, and avoid pairing it with W or Q. Everything else, including Command with letters, is safe here.
One more Apple quirk worth knowing before you conclude anything is broken: when macOS sees a keyboard it does not recognise, it runs the Keyboard Setup Assistant and asks you to press the keys beside each Shift to work out whether the board is ANSI, ISO or JIS. If that guess went wrong — easy to do by clicking through it — some keys will be mapped to the wrong characters permanently. It can be re-run from System Settings, under Keyboard, using Change Keyboard Type.
If your Mac is a laptop with a misbehaving key rather than a mapping problem, the laptop keyboard test covers the physical side, including the butterfly-mechanism failures that affect MacBooks from 2015 to 2019.