Has your keyboard stopped working? Assuming that you haven't spilled your drink over it (it's happened to us all) it may that all you need to do is make some changes to the software settings  on your Mac to get things working again.

The way to troubleshoot a broken keyboard depends on whether it's a wired keyboard (plugged in via USB) or wireless keyboard (connected via Bluetooth). Alternatively it may be that it is the keyboard of your Mac laptop that isn't working - your MacBook, MacBook Air or MacBook Pro might be unusable because the keypad has stopped working.

It might not be the whole keyboard that's stopped working. Perhaps it's just a key or two that no longer register. We'll also discuss what you can do if that is the case.

Another possible scenario is that the keys on your keyboard have changed, so that for example, the £ key is now a $ key. It's even possible that all the keys have been mapped differently so you are typing gobbledygook - if that's the case well done for finding this article.

For this tutorial we're going to assume that you can still use the mouse or touchpad with your Mac - if not, then take a look at this article as well: How to fix an Mac mouse.

How to fix a broken wired keyboard

Here's what to do if your wired keyboard isn't working properly with your Mac.

1. Check there's power

If all of the keys on your wired keyboard don't work the first thing to check is that it is correctly plugged into your Mac. Check the USB port at the back of your Mac and make sure the keyboard's not been yanked out. 

2. Change the connection

It's wise to try a different USB port if you have one available. If the other USB port works, great, although you may find you have an issue with the other USB port to deal with.

If changing the USB port doesn't work at least you have ruled out the possibility that the fault is with the port.

3. Restart your Mac

Restart the computer - it may be that while rebooting the Mac recognises the keyboard.

Another thing to try is logging out of your user account and logging into a different one, if you have more than one account on your Mac. Click on the Apple logo in the top left and choose Log Out. Log into a different account and see if this fixes the problem

How to fix a broken wireless keyboard

1. Check the power

If it's one of Apple's wireless keyboards (or any wireless keyboard) you need to check that the batteries have charge, and also that the keyboard is actually turned on. For example, on the right-hand side of the Apple wireless keyboard is a Power button. Press it to turn on the keyboard. A green light should appear.

If you need to change the batteries on an Apple wireless keyboard you'll need to use a coin to rotate the slot on the left-hand side of the keyboard so that you can remove and replace the batteries. Frustratingly it's our experience that the batteries in wireless keyboards go flat very regularly, so it's worth always having spare batteries to hand (or an emergency wired keyboard).

2. Check the Bluetooth connection

If you have a wireless keyboard you need to check its Bluetooth connection to your Mac.

Check that Bluetooth is activated on your Mac, and that the Mac and keyboard are paired.

To check that Bluetooth is turned on go to: System Preferences > Bluetooth. Check it's turned on and if it isn't turn it on.

If the keyboard is paired with your Mac you should see it listed under Devices.

If the keyboard isn't paired choose Set Up Bluetooth Keyboard and follow the steps.

3. Restart your Mac

Restart the computer - it may be that while rebooting the Mac recognises the keyboard.

As above you could try logging out of your user account and logging into a different one, if you have more than one account on your Mac. Click on the Apple logo in the top left and choose Log Out. Log into a different account and see if this fixes the problem.

4. Disconnect the keyboard

If you've replaced the batteries and checked the power, and the keys still don't work, then you should disconnect and reconnect your keyboard to the Mac.

Open System Preferences > Bluetooth. If the keyboard is listed in Devices, Control-Click it and choose Remove. Now choose System Preferences > Keyboard > Set Up Bluetooth Keyboard.

How to fix a damaged keyboard

If you think there is a chance that your keyboard has been damaged how you fix it depends on the cause.

What to do with a water damaged keyboard

If you spilt water on a wired or wireless keyboard you may be able to dry out the keyboard and get it working again.

The key thing here is to act quickly as the water can do damage if it touches the components of the keyboard - or worse your Mac if the keyboard is incorporated. Water spilled on a MacBook keyboard can quickly get into the circuitry so be sure to act quickly.

  1. Unplug the keyboard
  2. Turn over the keyboard
  3. Blot the keys
  4. Blow compressed air over it
  5. Leave the keyboard to dry for at least 12 hours
  6. Check the keyboard is dry before plugging it in again

If you spilt something stronger, or worst sticky, drying the keyboard may not be enough - especially if the residue is sticky.

What to do with a grubby, sticky keyboard

It might not be something wet that's stopped your keyboard working properly. From time to time it's a good idea to clean your keyboard (apparently they are more dirty than a toilet seat). Definitely don't submerge it in water though! There is guide to cleaning your keyboard here

If you need to get under the keys - perhaps because certain keys are sticking (possibly because you spilt something sticky on the keyboard) we have a guide to how to remove the keys on a Mac keyboard here.

What to do with a damaged MacBook keyboard

If the keyboard of your Mac laptop has stopped working the prognosis isn't so good. You may need to go to the Apple Store or your local Apple centre to enquire about the cost of replacing the keyboard.

Alternatively, you could try getting a second hand keyboard and replacing the one on your Mac, but we don't recommend this as MacBook keyboards are fully integrated with the MacBook case and are therefore not easy to change (Apple practically goes out of its way to make it impossible).

A better solution is to plug in a keyboard to your MacBook's USB port, or use a Bluetooth keyboard.

Really want to break open your Mac? Read How to get into a Mac: which screwdrivers do I need to open up a Mac case?

How to fix mixed up keys on a Mac keyboard

This step applies if your keyboard issues are related to specific characters. Perhaps the keys aren't registering as you expect them too.

Go to System Preferences > Keyboards and check Input Sources and make sure that the keyboard selected is the one for your country. You'd be surprised how mixed up the keys will be if you usually British keyboard was mapped for. For Example a French keyboard has azerty rather than qwerty across the top left.

Go to System Preferences > Keyboard > Input Sources and check that the correct language is listed. If you are from the UK and have a US keyboard set up on your Mac you will find some keys are not in the right place.

Speaking of keyboards, we have some articles that help with various keyboard related questions such as Where is the Option key on a Mac, as well as how to right-click on a Mac and How to find End and Home on a Mac keyboard. We also have Keyboard shortcuts for Mac users: copy & paste, Option, Command and Control.

What to do if the Number keys aren't working

Mac Number keys do not work

If you're having problem with just the number keys on your keyboard, you've probably turned on Mouse Keys by mistake. Mouse Keys is an accessibility feature that enables people to use the numerical keys to control the cursor. You need to check that you haven't accidentally turned on Mouse Keys, and if you have, turn it off.

Here's how to turn off Mouse Keys:

  1. First try to press the Option/Alt key five times. This is a common shortcut for turning mouse keys On and Off
  2. Open System Preferences > Accessibility
  3. Choose Mouse & TrackPad
  4. Deselect Enable Mouse Keys
  5. Click Options
  6. Deselect Press The Option Key Five Times to Toggle Mouse Keys
  7. Click OK