Connect a Bluetooth keyboard, mouse or trackpad to your Mac
Quick answer
Turn the keyboard or mouse on and put it in pairing mode, open System Settings > Bluetooth, then click Connect next to it under Nearby Devices. Apple keyboards, mice and trackpads pair by plugging them into the Mac with their cable.
Why it happens
A Bluetooth keyboard or mouse only shows up on a new Mac when it's in pairing mode, ready to be found. Many stay linked to the last computer they used, so they won't appear until you put them back in pairing mode. Apple's own keyboards, mice and trackpads skip that step and pair over their cable.
How to fix it
Charge the device or put in fresh batteries, and switch it on.
For an Apple Magic Keyboard, Mouse or Trackpad, plug it into your Mac with its cable and wait a few seconds. It pairs by itself, then you can unplug it and use it wirelessly. Older Apple models that take AA batteries have no port, so switch them on and connect them as in the next steps.
For other brands, put the device in pairing mode. Usually you hold a pairing or Bluetooth button until a light flashes. Check its manual if you're not sure.
Open System Settings and click Bluetooth. When the device shows under Nearby Devices, hold the pointer over it and click Connect.
Bluetooth›Nearby Devices
If your Mac shows a code, type it on the keyboard you're pairing and press Return or Enter. The device moves up to My Devices once it's connected.
Still not fixed?
Moving a keyboard or mouse from another Mac? Forget it on the old one first, or turn Bluetooth off there, so it doesn't jump back. An Apple one simply pairs with whichever Mac you plug it into.
If the device is already listed but won't connect, Control-click it in Bluetooth settings, choose Forget, then pair it again from pairing mode.
Bluetooth
On an iMac or Mac mini with no working keyboard or mouse, plug in any USB keyboard or mouse to get around while you pair the wireless one.
Some keyboards and mice come with a small USB receiver instead of using Bluetooth. Plug the receiver into the Mac and they work without pairing.
Turn Bluetooth off and on in Bluetooth settings, or restart your Mac, and try again close to the Mac.
If the device won't pair with any computer or phone, it's likely faulty, so contact its maker. If nothing at all will pair with your Mac, contact Apple Support, as its Bluetooth may need a repair.
Questions people ask
How do I pair a Magic Keyboard with my Mac?
Plug it into your Mac with its cable, switch it on and wait a few seconds. Then unplug it and it stays connected.
Why does my Mac ask me to type a code on the keyboard?
It's checking you're pairing the right keyboard. Type the numbers shown on that keyboard and press Return or Enter.
Why doesn't my Bluetooth mouse show up on my Mac?
It's probably not in pairing mode, or still linked to another computer. Put it in pairing mode and keep Bluetooth settings open while you wait.
Related fixes
Glad it worked.
Sorry it didn't. Tell us what happened and we'll fix this page.
Get there in one click with PinSet.
Press ⌃ ⌥ Space and type “how to connect a bluetooth keyboard”. PinSet opens Bluetooth › Nearby Devices in System Settings and rings Connect. One of 2,400+ checked Mac fixes. Works offline.
7 fixes free · Works offline · macOS 26 and 27