Your keyboard and mouse are the gateway to your computer, so if these stop working then you will find yourself somewhat hard-pressed to properly control your system. While for the most part an unresponsive input device is indicative of an issue with the device itself, there are times when a conflict with your Mac may be the reason for the problem. Either way, there are several steps you can take to overcome input problems and regain control of your Mac.
Handling Intermittent lag
Choppy input or apparent pauses followed by a flurry of input characters you have typed generally happens because of a problem with the programs you have open. Often when this happens you may see the spinning color wheel appear on your Mac, but not always.
There used to be a time when keypresses were queued in the peripheral bus itself (ie, way back when Apple used ADB connections). This allowed you to reliably enter sequences of keys and then wait, knowing they would be executed in sequence reliably once the system was freed from its hang. However, this is not supported with USB devices, and characters you type during a hang may be mixed around when finally interpreted by your computer, so you have to be careful with what you type during system lag.
Since the lag is intermittent, try only supplying input when the system is responding. Test with the benign keys and when you see an expected response (ie, a cursor shifts left when you press the left key), then try saving and quitting various programs you have open. Doing this should clear the problem, though a restart should also help ensure things run properly.
Handling Complete freezes
Sometimes you may experience complete input failure where keyboards and mice stop functioning altogether. This can show in a number of ways, including a simple inability to click, or a set of keys such as the Function keys or modifier keys (Command, Shift, Option, Control) not working while others seem to be doing so.
If this happens, your Mac is likely experiencing a problem with its input device drivers (all rolled into the various Human Interface Device, or “HID”, kernel extensions), and while you can try reloading them, the best approach here is to simply restart the machine. However, without input you may find the only approach for this is to hard-reset it by holding the power button.
Before resorting to this, there are several approaches you can take:
- Attach another keyboard to alternative USB ports. Using a secondary keyboard will have the system recognize and initialize a different device altogether. Attaching it to different USB ports will potentially make use of secondary USB controllers in your Mac, which may work if only the first controller is experiencing problems.
- Attach a Thunderbolt device to your Mac that hosts additional USB or even Bluetooth devices. Sometimes an input freeze is with your Mac’s USB controller going on the fritz, and since in many cases Apple’s Bluetooth controllers are simply internal USB devices, your wireless input devices may also no longer work. Adding new USB ports with a Thunderbolt device will attach an entirely new USB controller, and hopefully have the system properly recognize and use it, even if the internal one continues to malfunction.
- Use Remote Desktop to control your Mac. Provided you have Screen Sharing or “Remote Management” enabled in the Sharing system preferences, your Mac should appear as a shared device in the Finder sidebar of a second Mac on the local network. From here, you can log into your Mac control it, bypassing the USB controllers, HID drivers, and local input hardware. If you have a Linux or Windows system handy, you should be able to use a VNC client to connect to your Mac by its IP address (look this up in your network router’s configuration).
- Use Remote Login from another Mac. Similar to using Remote Desktop, if you do any work in the Terminal on a regular basis then you likely have your Mac’s “Remote Login” sharing service enabled. With this you can use “ssh” to log into your Mac from another system, and run a command such as “shutdown -r now” to more gently force a reboot than by holding the power button.
Ensure Proper Input Handling
Restarting your Mac will likely clear any input issues you may be having, but to help ensure they do not crop up again its good to give your Mac’s hardware a few resets to clear out any low-level settings that the system stores for use before the OS loads. Even though the OS should override any hardware-based settings as it loads your account and the system’s configuration files, a setting or two may be inherited from the initial hardware-based settings. To do this, simply reset your Mac’s PRAM by restarting and holding the Option-Command-P-R keys all at once when you hear the boot chimes (release when the system resets and you hear the boot chimes again), and also by resetting your Mac’s system management controller, since device handling issues may ultimately be from how power is being managed between various controllers on your Mac.