Are the mouse and keyboard USB and if so are they connected to a MOBO USB port (legacy) or to an accessory USB card?
I had this issue with an E machine. If there was a hard shutdown the USB accessory card was not recognized on boot up but the PS-2 keyboard and mouse ports worked.
If I used the PS2 ports and rebooted, checked driver issues through device manager and repaired or updated them, then the USB ports would activate again.