Mr40. I'm assuming you have wireless input devices? If so, id there a wireless dongle? Do you have a different computer to test the devices on? Do you have a working keyboard that's wired? What operating system are you using.
Just from what you posted, I would think it's a usb issue. We need more info if you can take a minute.
HP pc is slim info, but checking a couple of forums
you could try turning off your pc and while in black screen after turning back on press and hold the F8 key.
or
uninstall/reinstall the keyboard driver. - Go to Device Manager and uninstall the keyboard driver. - Reboot and once the driver has been uninstalled and it should reinstall the driver automatically. - After the reboot do test it again and see if it will work or not.