A keyboard freezes up because of a broken connection between it and the motherboard, and this can be a product of continual wear and tear. Once the ribbon or cable connecting the motherboard to the keyboard fails to transmit data, the keyboard loses functionality on the computer; causing the freeze.
A keyboard can freeze up because of a faulty port on the motherboard or a malfunctioning keyboard. It can also be a water spill that short circuits the motherboard damaging the wiring on major copper points, thereby leading to the occurrence of even more tertiary problems.
Sometimes, restarting the computer gets everything back to normal but if not, the user needs to test the motherboard. Using a functioning external keyboard enables users to properly identify the cause, and if plugging it into the computer eliminates the freeze, then the problem is with the keyboard. Users then want to replace it. For a laptop, users should try getting it open, and reconnect the ribbon cable that hooks to the keyboard. However, if the plugged keyboard still freezes when connected, then the error is with the motherboard. They can try using a different keyboard port, and if this works, then that specific input port was the cause of the freeze.