One of these will get them re-connected
Does your iMac fail to recognize your Magic Keyboard, Mouse, or Trackpad? Or does it struggle to maintain a stable connection to your input devices? Usually, the issue is keyboard or mouse-related and relatively easy to resolve. But in some cases, you may have to resort to troubleshooting various aspects of your iMac to fix it.
The instructions below will walk you through various suggestions and solutions to get your iMac to recognize your Magic Keyboard or Mouse. Some of the fixes also apply to third-party wireless keyboards and mice.
Navigating Your iMac
Some fixes require a functioning keyboard or mouse to navigate and interact with your iMac. Here’s what you can do:
- Use a third-party wired USB keyboard or mouse.
- Use your Magic Keyboard or Trackpad in wired mode (more on that below). Unfortunately, you can’t use the Magic Mouse due to the location of its charging port.
- If the issue is limited to your mouse or trackpad, use the keyboard to navigate on-screen elements or activate Mouse Keys.
1. Turn Keyboard or Mouse On/Off
The Magic Keyboard, Mouse, or Trackpad can experience occasional glitches in the firmware preventing it from working correctly with your iMac. Thankfully, you can deal with them quickly by restarting the problematic input device. Just find the Power switch, flick it Off (white), and then On (green). The same applies to third-party wireless keyboards and mice.
Note: If you’re setting up a new iMac, your Magic Keyboard, Mouse, or Trackpad will not show up unless you turn it on.
2. Restart Your iMac
Another quick fix involves restarting your iMac. Hopefully, that should resolve minor system-related issues preventing it from recognizing or connecting to your keyboard or mouse.
1. Open the Apple menu and select Restart.
2. Uncheck the box next to Reopen windows when logging back in.
3. Select Restart again to reboot your iMac.
3. Connect Keyboard or Mouse via USB
If your iMac fails to recognize your Magic Keyboard, Trackpad, or Mouse, briefly establish a wired connection via USB. If that helps restore connectivity, disconnect the cable and wirelessly use the device.
Note: If you purchased a Magic Keyboard, Trackpad, or Mouse separately from your iMac, the device would only pair via USB.
4. Charge Keyboard or Mouse
A Bluetooth mouse or keyboard with little charge remaining can create connectivity issues on the iMac. So, try charging it and see if that makes a difference.
Again, plug your keyboard, mouse, or trackpad into a USB port on your iMac and wait at least 15 minutes before using it again. If you use an input device with replaceable batteries (e.g., the first generation Magic Keyboard and Mouse), swap them with a fresh pair.
5. Disconnect and Reconnect to Bluetooth
A corrupt Bluetooth device cache can also play a factor, so the following fix involves reconnecting your Apple wireless keyboard, mouse, or trackpad to your iMac.
1. Open System Preferences.
2. Select Bluetooth.
2. Select the X-icon next to the input device.
4. Select Remove.
5. Restart the input device and select Connect to re-pair the keyboard or mouse with your iMac again.
6. Remove and Reconnect USB Receiver
If you use a third-party non-Bluetooth keyboard or mouse, remove the USB receiver and plug it back in, preferably to a different port on your iMac. It’s also good to avoid connecting the receiving device to an external USB hub or adapter.
7. Reset Bluetooth Module
Next up, try resetting your iMac’s Bluetooth module via Terminal:
1. Open the Launchpad on your Mac and select Other > Terminal.
2. Type the following command and press Enter:
sudo pkill bluetoothd
3. Type in your Mac’s administrator password and press Enter again.
8. Factory Reset Apple Devices
If you use macOS Big Sur or earlier, you can factory reset your Magic Keyboard, Mouse, and Trackpad. That can resolve additional firmware-related issues that you can’t resolve by restarting the device.
1. Connect your Mac keyboard, mouse, or trackpad via USB.
2. Option-click the Bluetooth icon on the Control Center or menu bar.
3. Select Factory Reset all Connected Apple Devices.
4. Select OK.
9. Reset Bluetooth Preferences
A corrupt Bluetooth preferences file can be another reason for any wireless mouse or keyboard issues on your iMac. Delete it and check if that makes a difference.
1. Control-click the Finder icon in the Dock and select Go to Folder.
2. Type the following path into the Go to Folder box and press Enter:
~/Library/Preferences/
3. Locate and drag the following file into the Trash:
com.apple.Bluetooth.plist
4. Restart your Mac.
Note: macOS will automatically create a new Bluetooth preferences file from scratch when you restart your Mac. If it encounters any issues doing that, restore the original from the Trash.
10. Use the Bluetooth Setup Assistant
Your iMac may not automatically connect to the keyboard and mouse in special environments such as macOS Recovery. When that happens, press the Power button on your iMac three times (wait for one second after each press) and use the Bluetooth Setup Assistant to connect to them manually.
11. Reset NVRAM on iMac
If you use an iMac running an Intel chipset, resetting the NVRAM (non-volatile random access memory) can also resolve keyboard and mouse-related issues. However, you need a wired keyboard to perform this fix.
1. Turn off your iMac.
2. Press the Power button while holding down the Command, Option, P, and R keys.
3. Release the keys when the Apple logo shows up for the second time or when your iMac chimes twice.
12. Perform SMC Reset
If the issue persists, reset your iMac’s SMC (Storage Management Controller) next.
1. Turn off your iMac.
2. Unplug the power cable.
3. Wait for 15 seconds and plug in the Power cable.
4. Wait for another 5 seconds.
5. Press the Power button to turn on your iMac.
13. Update Your Mac
If your iMac came pre-installed with an early release of macOS (such as macOS 12.0 Monterey), it’s best to rule out any bugs in the system software by installing any pending updates as soon as possible.
1. Open the Apple menu and select About This Mac.
2. Select Software Update.
3. Select Update Now.
What Else Can You Do?
Wireless interference from external sources—such as unshielded power cables, kitchen equipment, or other wireless devices—can seriously mess up the connection from your iMac to your keyboard or mouse. See if shifting the desktop device to another area of your house or apartment helps.
If the issue persists, try troubleshooting your iMac into Safe Mode. If that doesn’t help as well, you’re likely dealing with a faulty keyboard or mouse. Send it back for a replacement if it’s still under warranty.