1. Check the connection
- Magic Keyboard or Bluetooth keyboard: check it's switched on and charged. Connect it to the Mac with its cable for a moment; this also pairs it again.
- Remove the keyboard under System Settings › Bluetooth and pair it again if it keeps disconnecting.
- USB keyboard: plug it straight into the Mac rather than a hub or adapter.
2. Turn off Slow Keys and Mouse Keys
- Slow Keys makes you hold each key before it registers. Open System Settings › Accessibility › Keyboard and turn it off.
- Mouse Keys turns some letter and number keys into pointer controls. Turn it off under System Settings › Accessibility › Pointer Control.
3. Wrong characters? Check the input source
If keys type the wrong letters or symbols, the Mac is using a different keyboard layout.
- Open System Settings › Keyboard and, next to Input Sources, select Edit.
- Choose the layout that matches your keyboard, and remove ones you don't use.
- Tip: the Globe or Control + Space shortcut switches input source, which is easy to press by accident.
4. Function keys change brightness instead
By default, the top row controls brightness, volume and media. To use them as F1, F2 and so on, hold fn while pressing them, or open System Settings › Keyboard › Keyboard Shortcuts › Function Keys and turn on Use F1, F2, etc. keys as standard function keys.
5. Restart in safe mode
Safe mode starts the Mac without extra software. If the keyboard works in safe mode, an app such as a keyboard customiser or text expander is interfering. Apple's support site explains how to start in safe mode for your Mac model.
6. Clean the keyboard
Hold a MacBook at an angle and use compressed air in short bursts between the keys, working from side to side. For a sticky key after a spill, switch the Mac off and get it checked before it spreads.
Still not working?
Try another keyboard. If an external keyboard works but the built-in one doesn't, the MacBook keyboard needs repair; contact Apple Support or an authorised service provider.
Frequently asked questions
Some keys type numbers instead of letters.
Mouse Keys or a numeric keypad mode may be on. Turn off Mouse Keys in step 2.
The keyboard works after login but not at the login screen.
Bluetooth keyboards sometimes connect late. Use the Mac's built-in keyboard or a wired keyboard at login, or connect the Magic Keyboard with its cable.