Could be several things. Start with disconnecting the mouse and plug it straight into a USB port. Now you can independently test both the keyboard and mouse.
Next start up in Safe Mode by holding down the Shift key on start up. This will tell you if it is a software issue. Let us know your results.
I’m wondering if the keyboard problems have prevented complete resets. I’d start over, go through all of this to see if you can reset. If after all this we can look at running in depth hardware diagnostics.
First and foremost, keep in mind that sometimes a USB device itself can fail, which may have nothing to do with the Mac itself. This is particularly true with cheap low quality USB devices and cables. The easiest way to determine if the USB device itself is the problem versus the Mac USB port, is to try and use at least two different USB devices and switch their ports. If multiple USB devices are not working on a particular port, or all ports, then it’s obviously less likely to be a device issue, and more likely to be related to the Mac itself. And yes, this can apply to any and all Macs, whether a MacBook Pro, MacBook Air, MacBook, iMac, Mac Mini, or Mac Pro.
So, you’re confident a USB port is the problem and not the device itself? The first thing you should do is reset the Mac SMC, a simple process which is slightly different depending on the Mac hardware.
You can learn how to reset the SMC on all Macs here in our detailed tutorial. For those with a MacBook, MacBook Pro, and MacBook Air, all you need to do is this:
- Shut down the Mac and connect the power cable
- Hold down Shift+Control+Option+Power concurrently for a few seconds, when the light on the power adapter blinks or changes colors you’ll know SMC reset is complete
- Release all keys at the same time
- Boot the MacBook Pro / Air by hitting the power button as is typical
The USB ports on the MacBook should now work just fine, which you can confirm by connecting the USB device as usual and checking to be sure that it works – if it’s still not working, try another USB port, and try another USB device.
Sometimes resetting the NVRAM / PRAM on a Mac can help resolve the USB port failure as well, since NVRAM holds various data about keyboards, mouse, trackpad, and other USB components. Here is how you can perform the NVRAM reset on a Mac to see if this resolves the USB failure:
- Restart the Mac, and immediately hold down Command + OPTION / ALT + P + R keys together – keep holding the keys down until you hear a sound and see the screen flash, it may take a few seconds
- The Mac should make a chime sound again, then let it boot as usual
When the Mac boots back up again, USB should be working as usual.
If, after an SMC reset, and after an NVRAM reset, none of the USB ports are working, and no USB device is working, something else is likely up with the Mac.
- If a single USB port has failed but other USB ports are continuing to work on the Mac, even after an SMC reset, there may be an issue with that specific hardware USB port – you can either avoid using that USB port and instead use a USB hub for one of the other functioning ports, or you can have Apple run a hardware diagnostics test on the machine to determine if there is any hardware failure
- If liquid has splashed on the Mac or the MacBook has contacted water, you will need to take immediate steps to power down and dry out the Mac for a chance to prevent permanent damage – liquid contact can destroy a Mac rather quickly, or damage certain hardware functionality, like USB
- If some USB devices work on the Mac, but another USB device does not work, consider that the device may be incompatible with that particular Mac, the USB device may be failing or have failed, or, in some situations, the USB device may need specific hardware drivers from the manufacturer in order to work properly (typically the case with special use devices, high-end scanners, etc)
- If there are firmware and OS X software updates available, install them onto the Mac. You can check this by going to the Apple menu > App Store > Updates section – be sure to backup the Mac before installing any system software
Why USB may suddenly cease to work isn’t always obvious, but if all else is well and the USB failure happened out of the blue, the hardware SMC reset is almost always the solution. This exact scenario happened to me recently when I traveled with a MacBook Pro, where mysteriously many hardware functions on the Mac failed simultaneously, with all USB ports ceasing to work with any USB device, a Bluetooth Unavailable errorappeared, sleep failure, and fans spinning up like a jet engine with no apparent cause – all classic symptoms of something gone haywire with the System Management Controller, all easily resolved by the reset process outlined above and here. Of course, I’m an experienced Mac user so I knew this this, but given that many other Mac users out there are less familiar, this type of troubleshooting is always worth covering and sharing.