Keyboard Test
English

Mac Keyboard Test

Press every key on your MacBook or Magic Keyboard and watch it register on a Mac layout with Command, Option and the arrow cluster in the right places. Runs in Safari, Chrome or Firefox with nothing to install.

Tested0/76
Presses0
Held now0
Max at once0
Issues0
HeldWorksChatter / stuck
  • Press any key to start. The last presses show up here.

To test a Mac keyboard, click on this page and press every key once: each key on the Mac diagram turns amber while you hold it and green once it has registered. Keys that stay dark are not reaching macOS, keys that turn red sent presses you did not make, and the only key that cannot be tested here is Fn, which macOS handles before any browser sees it.

The diagram above is the Mac layout: a top row of Escape and F1 to F12, delete instead of Backspace, return instead of Enter, and a bottom row of Fn, control, option, command, the space bar, command, option and the inverted-T arrow keys. It matches a MacBook, a MacBook Air, a MacBook Pro and the compact Magic Keyboard. If yours has a number pad, switch the layout to Full, and if your return key is tall with an extra key beside the left Shift, pick ISO.

How to run the Mac keyboard test

  1. Click anywhere on the page, or tap the text box if you are testing an iPad with a keyboard attached.
  2. Press each key once, row by row. Hold Fn while you press the top row so the keys are sent as F1 to F12 rather than brightness and volume commands.
  3. Press control, option and command on their own, one at a time, and let go before moving on.
  4. Watch the Tested counter. When it reaches the total for the layout, every key the browser can see has registered.
  5. Hover over any key to see its code and how many times it has been pressed, and check the log under the diagram for the time each key was held.

The log shows the KeyboardEvent.code of each press, not the character, so a Mac keyboard set to a French or German layout is tested the same way as a US one. Use the what key am I pressing page if you want to see the character, the key code and whether a modifier was the left or right one.

Which keys does macOS handle itself?

macOS takes several keys before they reach Safari or Chrome. None of the entries in this table mean the key is broken, and each one has another way to check it.

KeyWhat the test showsHow to check it instead
Fn or GlobeDashed outline, never lights upHold Fn and press F1: the key registers as F1 instead of lowering brightness. On a keyboard with a Globe key, pressing it alone opens the emoji picker, starts dictation or switches input source, depending on the setting in System Settings under Keyboard.
Touch IDNot on the diagramLock the screen with Control, Command and Q and unlock with your fingerprint.
F1 to F12 without FnDark, because macOS runs the brightness, Mission Control, Spotlight, dictation, Do Not Disturb, media and volume actionsWatch the on-screen indicator for brightness or volume. Hold Fn to send the plain function key to the test.
Caps LockAmber after one press, red after three secondsPress it again to turn the lock off. The key then clears.
Command with another keyThe other key may stay amber until you release CommandTest Command alone. The test releases the other keys when Command goes up.
Eject or Power on an older Magic KeyboardNot on the diagramHold it and watch for the sleep dialog.

Why F1 to F12 need Fn

Every Mac keyboard ships with the top row set to its printed function: F1 and F2 change brightness, F3 opens Mission Control, F4 opens Spotlight or Launchpad, F5 and F6 handle dictation, Do Not Disturb or keyboard brightness depending on the model, F7 to F9 control media and F10 to F12 control volume. Those actions happen inside macOS and the browser is never told about them. Holding Fn flips the key to the plain F1 to F12 code, which the test can see.

You can reverse that behaviour in System Settings under Keyboard, Keyboard Shortcuts, Function Keys, with the option Use F1, F2, etc. keys as standard function keys. With it on, the top row registers on its own and Fn switches a key back to its media function. Either way, one of the two presses reaches the test, so you can confirm the switch under every top-row key.

F11 is a special case. macOS binds it to Show Desktop by default, so Fn and F11 together may hide your windows instead of registering. If F11 stays dark, check Mission Control under Keyboard Shortcuts, or turn the shortcut off for the length of the test.

Why Caps Lock behaves differently on a Mac

On a Mac, the browser receives a key-down for Caps Lock when the lock turns on and the matching key-up only when it turns off. The test sees a key that has been held for a long time, so it turns red as a suspected stuck key after three seconds. A second press clears it. If Caps Lock never changes colour at all, the key is genuinely dead, because even the first press should turn it amber.

Stuck: the key-down arrived but the release never did. After three seconds the amber key turns red.

Why Command hides other keys

While Command is held, macOS treats the combination as a shortcut and does not report the release of the other key to the browser. If you press Command and then A, the A key would stay amber forever. The test handles this: the moment Command is released, every other key still marked as held is cleared and its hold time is written to the log. The practical rule is to press Command on its own, and never to hold it while you test letters.

Testing a MacBook with a butterfly keyboard

MacBook, MacBook Air and MacBook Pro models sold between 2015 and 2019 used a low-travel butterfly mechanism that is prone to three faults: a key that repeats on a single press, a key that needs a hard press to register, and a key that feels sticky. All three show up in this test. A repeating key turns red and the extra press in the log is labelled chatter, a key that needs force stays dark on a normal press, and a sticky key stays amber after you let go.

Chatter: a worn switch makes a second, tiny contact within 25 ms of the release. The keyboard reports two presses; the test marks the key red.

Apple ran a keyboard service programme for these models. Whether a particular machine is still covered depends on the model and the purchase date, so check your serial number with Apple Support before paying for a repair. Apple's published cleaning method, holding the laptop at an angle and blowing compressed air across the keys in a zigzag, clears light debris but does not fix a worn mechanism.

Reading the results on a Mac

What you seeLikely causeNext step
One key never lights upDebris under the key, worn mechanism, or a key the system handlesCheck the table above first, then clean the key
One key turns red with chatter in the logBouncing switch or butterfly mechanismCleaning may help; otherwise the key or keyboard needs replacing
Key stays amber after releaseKey physically stuck or missing release eventPress it again. If it happens on letters, clean under the keycap
Whole row darkMatrix line or ribbon cable, often after a spillHardware repair
Random keys dark after a spillCorrosion under the keyboardPower off, dry, then service
Keys work on an external keyboard but not the built-in oneBuilt-in keyboard hardwareService, or an external keyboard as a workaround

Testing an external keyboard alongside the built-in one is the quickest way to separate hardware from software. If a Magic Keyboard or any USB keyboard passes the test on the same Mac, the fault is in the laptop's keyboard. If both fail on the same key, look at macOS first: Slow Keys and Sticky Keys under Accessibility, the input source in the menu bar, and any keyboard remapping utility you have installed.

Mac keys and what the browser calls them

The test and the log use the physical key code, which does not change with the language layout. On a Mac the names can look unfamiliar:

  • Command is MetaLeft and MetaRight.
  • Option is AltLeft and AltRight.
  • Delete is Backspace, and forward delete on a full-size Magic Keyboard is Delete.
  • Return is Enter, and the enter key on the number pad is NumpadEnter.
  • The key to the left of 1 on an ISO keyboard can report as Backquote or IntlBackslash depending on the browser.

Hover over any key on the diagram to see the code it expects, which is handy when a keycap label has worn off or a third-party keyboard has Windows markings.

Related tests

The keyboard test on the home page runs the same check with the full desktop layout. The laptop keyboard test covers Windows notebooks with a Fn key and the top-row shortcuts that go with it. If a key fails here, keyboard keys not working walks through the fixes, from Accessibility settings to cleaning and replacement.

Frequently asked questions

How do I test my MacBook keyboard?

Click on this page, then press every key once and watch the Mac diagram above. A key that turns amber while held and green when released is working. A key that stays dark never sent anything to macOS, and a key that turns red registered extra presses or has been held for more than three seconds. Only the Fn key cannot be tested this way, because macOS handles it before the browser sees it.

Why do the brightness and volume keys not light up?

By default macOS uses the top row for brightness, volume and media control, and those actions never reach the browser. Hold Fn while you press a top-row key and it is sent as F1 to F12 instead, which the test can see. If you have turned on Use F1, F2, etc. keys as standard function keys in System Settings, the behaviour is reversed: the keys register on their own and Fn switches them back to media control.

Why does Caps Lock stay amber or turn red?

macOS reports Caps Lock as a press when the lock turns on and as a release when it turns off, so one press leaves the key held in the test. After three seconds it turns red as a suspected stuck key. Press Caps Lock again to turn the lock off and clear it. This is a quirk of macOS, not a fault in your keyboard.

Can I test the Touch ID key?

Not in a browser. The Touch ID button is a power button and fingerprint sensor, and it does not send key events to any application. To check it, lock the screen with Control, Command and Q, then unlock with your finger. If the sensor does not respond, add the fingerprint again in System Settings under Touch ID and Password.

Why did several keys clear at once when I let go of Command?

While Command is held, macOS does not send the browser the release events for other keys. The test knows this and marks every key still held as released the moment Command goes up. That is why you should test Command on its own, and why you should avoid combinations such as Command and Q, W, H or M during the test, because the browser or macOS acts on them.

Does this work with a Magic Keyboard or a third-party keyboard?

Yes. Any keyboard connected to the Mac by cable or Bluetooth is tested the same way. For a Magic Keyboard with Numeric Keypad, switch the layout to Full so the number pad and the navigation keys are on the diagram. A Windows keyboard on a Mac works too, with its Windows key reported as Command and Alt as Option.

My 2015 to 2019 MacBook keyboard repeats or misses letters. Is it the butterfly keyboard?

Very likely. MacBook, MacBook Air and MacBook Pro models from those years used a butterfly mechanism that is known to repeat, miss or stick when a tiny amount of debris gets under a key. Apple ran a keyboard service programme for the affected models. Whether a given machine is still eligible depends on the model and the purchase date, so check with Apple Support before paying for a repair.

More keyboard tests

Each test below checks one part of your keyboard in more detail.