The version of the USB device, but it doesn't usually take very long to recognize a usb device on boot since the usb support gets loaded by the OS..https://en.wikipedia.org/wiki/Universal_Serial_Bus
I don't know for sure, but if you could you might want to either try your keyboard on some other computer that is running windows OS and see how well it detects the keyboard; if it also has a problem, then you might research the actual brand/model number for any issues
--the usb wiring for the keyboard comes from that vendor and usually should be straightforward to use
Also you might consider switching parts with the mouse, see how well that is working
--additionally clean any device contacts, pure alcohol (90% available from a drug store to clean the surface area of the device: port and jack) or any other electronics cleaner you have (degrease etc..)The OS parts ..
The keyboard as is selected, is it a version that you don't have the full software support included in the OS
--check you system settings for keyboard/language; the usual standard keyboard is 105 us pc keyboard (the connection isn't important, if it works..)
--are you trying to use a brand name selection (might not be well supported), generic keyboard types are usually better to use
--are you trying to use a media keyboard with lots of extraneous selection keys or one with an extra large number of keys..