My Bluetooth keyboard doesn’t work properly

Wireless keyboards have become extremely popular. What had been among the dullest and most reliable peripheral has now, for some, become an infuriating problem. At its worst, your Bluetooth keyboard can insert characters which you never typed, turn your perfect prose into a messs of dduplicatte chharacteers, and quickly drive you to distraction.

It is essential that you keep a fallback wired keyboard to hand. When you need to start your Mac up in Recovery mode, or to run diagnostics or hardware test, the keyboard must be connected to a USB port for macOS to reliably recognise the startup key combination. If you have a rechargeable Apple wireless model, connect its charging cable to use it as a USB, rather than wireless, keyboard.

The first thing to rule out when you’re having wireless keyboard problems is lack of battery power. If rechargeable, charge it up to 100%; if it uses replaceable batteries, consider replacing them.

Settings

Next you should ensure that its settings are correct. There are three important places to look.

wikeyboard1

In the Keyboard pane in System Preferences, select the Input Sources tab and ensure that the correct keyboard is active. Inadvertently using a foreign language keyboard will change the allocation of keys, and can have very strange consequences.

wikeyboard2

In the Keyboard tab, ensure that the Key Repeat and Delay Until Repeat settings are reasonable.

wikeyboard3

Don’t forget to open the Accessibility pane, and select Keyboard in the items at the left: unless you need them, you should disable Sticky Keys and Slow Keys, which again will change the behaviour of your keyboard in ways that you may find odd.

wikeyboard4

Opening the Keyboard Viewer should then show you the keyboard layout which you prefer, and the modifier keys such as Option, Shift, and Control should reveal the correct additional characters.

These keyboard settings are stored in two separate preferences files: that at ~/Library/Preferences/com.apple.HIToolbox.plist contains the settings which apply to the current user once they have logged in. However, before and during the login process, the settings which apply are those in /Library/Preferences/com.apple.HIToolbox.plist. These are the same for both El Capitan and Sierra.

If you have problems with your keyboard when you try to log in, but once logged in they settle, you should try moving the settings at /Library/Preferences/com.apple.HIToolbox.plist (that’s in the top-level Library folder); if your settings are fine then but run into problems once you have logged in, try moving the settings at ~/Library/Preferences/com.apple.HIToolbox.plist (that’s in the Library folder in your Home folder).

Connecting a rechargeable Apple wireless keyboard using its charging cable will enable you to log in if you’re experiencing early problems with that keyboard.

Bluetooth keyboards are also paired and controlled in the Bluetooth pane of System Preferences. It is common for advice on dealing with keyboard problems to recommend removing your keyboard and re-pairing it. However, in my experience this seldom does a great deal. Feel free to try it, but don’t expect it to solve anything.

One simple trick which is more likely to help, though, is turning your keyboard off, leaving it for ten seconds or so, then turning it back on again. Keyboards contain processors, and this can unscramble them when they have got into difficulties.

Bluetooth

Unfortunately, the most common problems with Bluetooth keyboards result from underlying issues with Bluetooth. El Capitan had a nest full of nasty bugs in its Bluetooth support, and few Macs running El Capitan ever avoid suffering from them. These bugs can result in spontaneous Bluetooth disconnections, which are often followed by re-connection, stuttering of entered characters, and sometimes complete loss of control of the keyboard, most worryingly when you are trying to log in.

Sierra is much better, but still far from perfect. Spontaneous disconnections occur much less frequently, the keys still repeat occasionally, but loss of control has become far less common. So if you are experiencing wireless keyboard problems in El Capitan, upgrading to Sierra could result in dramatic improvement.

macOS updates can also go wrong and affect Bluetooth badly: it is always worth considering downloading and installing the latest Combo updater, particularly if your problems developed after an update. However, re-installing macOS is much less likely to bring resolution, although it is often recommended.

With some versions of macOS, and in certain conditions, Bluetooth reception can be a problem: I used to keep thick wads of paper near and under my wireless keyboard, and in some situations they appeared to attenuate the radio signals and could cause problems. If you can, move the Mac and keyboard to a location where they are on the same level and there is nothing to impair radio transmission between them.

Hardware

If you have tried all these and your keyboard is still giving you grief, you should seriously consider whether the problem is in the keyboard itself. Although modern keyboards minimise mechanical components to improve reliability, they do still go wrong. Try another Bluetooth keyboard, and try your troublesome keyboard with another Mac.

Diagnostics and hardware test can report keyboard problems, with error codes starting with NDK, and Bluetooth issues, which start with NDL, but these appear quite rare.

Additional tools

Bluetooth Explorer is supplied as an additional tool for Xcode, available free from the App Store.

Consolation lets you browse Sierra’s log, and is free from Downloads above.