TestKey

Test your Mac keyboard

Press each key on your MacBook or Magic Keyboard. Command, Option and Control are tested on both sides.

MusicLo-fi beats

This keyboard test needs JavaScript. Turn it on in your browser settings to test your keys; the guide below works without it.

0%0 / 0 keys
0held now
0peak rollover
–Last key

Swipe sideways to see the whole keyboard.

UntestedTestedHeld

Style

Live events

0 events
Key presses will appear here as little keycaps.

Key sound

How to test a MacBook or Magic Keyboard

  1. Open this page in Safari, Chrome or Firefox and click the keyboard picture.
  2. Press every key once. Left and right Command, Option and Shift are separate positions, so press both sides.
  3. The top row (F1 to F12) is not part of this test, because Macs use it for brightness, volume and media controls. If media keys reach the browser, they light up in the Media & Fn-row keys strip.
  4. Press Finish test to see which keys have not arrived yet, then save the report or image.

This Mac keyboard tester works for a MacBook Air, a MacBook Pro, a Magic Keyboard and any other Apple keyboard you use with your Mac. It also works for an iPad with an external keyboard: open the page in Safari on the iPad and press the keys.

The Apple layout here follows the full-size Magic Keyboard with numeric keypad. A MacBook has fewer keys: it has no numeric keypad, no F13 to F19 and no Home, End or Page keys. Those positions simply stay untested; the counter for a MacBook will stop below 100%, which is expected.

Mac modifier keys and their codes

Key on the keyboardWhat the browser reports
⌘ Command (left / right)MetaLeft / MetaRight
⌥ Option (left / right)AltLeft / AltRight
⌃ ControlControlLeft (most Mac keyboards have no right Control)
delete (backspace)Backspace
⌦ forward deleteDelete
returnEnter
clear (keypad)NumLock

Keys macOS keeps for itself

Some keys and shortcuts never reach a web page on a Mac. That does not mean they are broken:

  • fn / Globe is read by the keyboard and macOS. It switches what other keys do and has no code of its own for websites.
  • Touch ID and the power button are handled by the system.
  • Media keys on the top row control brightness, Mission Control, Spotlight or volume unless you hold fn. You can swap this in System Settings › Keyboard › Keyboard Shortcuts › Function Keys by turning on “Use F1, F2, etc. keys as standard function keys”.
  • System shortcuts such as ⌘ Space, ⌘ Tab and ⌃ arrow keys are taken by macOS. Avoid ⌘ Q and ⌘ W while testing: they close the browser or the tab.

Mac quirks the test handles for you

When you hold Command and release another key, macOS does not always tell the browser that the other key went up. The test releases every held key when Command goes up, so you will not see keys stuck in purple.

Caps Lock on a Mac reports its lock state rather than each press. The test counts the first signal, briefly shows the key as held and then releases it. MacBooks also ignore very short taps on Caps Lock to prevent accidental activation, so press it a little longer than other keys.

Common MacBook keyboard problems

MacBook models with the thin “butterfly” keyboard (roughly 2015 to 2019) are known for keys that stick, repeat letters or stop responding. Run the full test, then use the chatter test on any key that types twice. If a key is dead or repeats, carefully clean it with compressed air held at an angle, test again, and keep the saved report if you contact a repair shop.

On newer scissor-switch MacBooks, a dead key after a spill is the most common case. Switch the Mac off, let it dry fully and test again before you assume the keyboard needs replacing.

Magic Keyboard over Bluetooth

A Magic Keyboard that drops letters or repeats them is often a connection problem, not a key problem. Charge it or plug it in with its cable, which also switches it to a wired connection, and run the test again. If the problem disappears on the cable, look at Bluetooth interference: USB 3 hubs, other wireless devices and a long distance to the Mac all play a part. If the same keys fail on the cable too, the keyboard itself is at fault.

Testing a MacBook with an external keyboard attached

Both keyboards send the same codes, so the test cannot tell them apart. Disconnect the external keyboard while you test the built-in one, or test one keyboard at a time and press Reset in between. The Apple layout stays selected on this page; switch to Windows above the keyboard if you test a PC keyboard on your Mac. In that case the Windows key arrives as Command and Alt arrives as Option, because macOS maps them that way.

Frequently asked questions

Can I test the fn or Globe key on a Mac?

No. fn and Globe are handled by the keyboard and macOS, and no website receives a signal from them. The key is shown with a dashed outline and is not counted.

Why are F1 to F12 not part of the Mac keyboard test?

By default macOS uses the top row for system controls such as brightness and volume, and browsers cannot report them reliably. The strip under the keyboard shows media keys when they arrive. To use F1 to F12 as standard keys in other apps, turn on “Use F1, F2, etc. keys as standard function keys” in System Settings › Keyboard.

Why will my MacBook not reach 100%?

The Apple layout includes the numeric keypad and F13 to F19 from the full-size Magic Keyboard. A MacBook does not have these keys, so they stay untested.

Does the Mac keyboard test work in Safari?

Yes. It works in current versions of Safari, Chrome, Firefox and Edge on macOS.

Is it safe to press Command shortcuts during the test?

Most are, but ⌘ Q quits the browser and ⌘ W closes the tab. Press Command on its own, or with a harmless key such as a letter you have already tested.

Keyboard test report

Key positions and counts only. Copy it into a repair ticket or a listing for a used keyboard.