We would discuss different reasons that might cause your mouse or keyboard to stop working, one by one.
Possible problems with mouse malfunctioning:
If your mouse happens to be a plugged in device, then first of the most obvious reasons for it to stop work might have something to do with the connection. Check if the mouse is completely plugged in, and there is no loose connection. If everything is all right with the connection, then unplug the device and check for the pins; they might be damaged.
If the mouse was working fine, and all of a sudden stopped to work, the problem might be with the trackball; open the trackball, and check for any deposit trapped in the trackball chamber. If you find something, clean both the chamber and the trackball with a cotton wipe and alcohol.
If you observe the pointer not working properly, and moving in an odd way, a virus may be responsible for it. Some computer viruses affect the functionality of the mouse. If you don’t have an anti-virus installed, you can download a program like System Optimizer Pro, and scan your computer for viruses.
If none of the above reasons are to be blamed, then check for the drivers. Go to:
Control Panel System and security folder Device driver Tab
Select ‘Mouse’ and check if the driver is installed properly. A yellow icon signifies some problem. In this case, you can uninstall the mouse and restart your computer. You can now try reinstalling the mouse, and again reboot your computer.
Clean your mouse regularly, both from inside and outside with a cotton ball and little alcohol.
If the pointer is moving erratically, reset the acceleration and speed settings for the pointer.
Possible Problems with the keyboard:
As with mouse, if your keyboard happens to be a plugged in device, check for loose connections, if any. Try to use your keyboard with another computer, if possible; if it does not work there too, that would mean your keyboard is defective and might need a replacement.
Check for the drivers. If your keyboard is a wireless one, then they need proper drivers to work. Check the manual and CD that came along with the package, and install the necessary software.
Sometime the problem is as simple as dust accumulation. Try turning your keyboard upside down to remove any food crumbs or dust. Try using an air compressor or vacuum to clean hard to reach places.
Water spill is fatal, take extra care.
Don’t ever disassemble the keyboard while troubleshooting.
If your mouse and keyboard are wireless, in addition to above problems, problems can also be with the depleted batteries hampering.