Let me first say that I have fixed my keyboard drivers as of right now by doing a system restore, helpfully created by avast when it installed trial mode. However, I would like to know what happened to make it easier to deal with next time (the on-screen keyboard is a real pain). I am on windows 8.1 if that helps.
Basically, following the restart for installing trial mode, my keyboard would not work at all, although it was recognized by the computer (the keyboard in question is a Rosewill RK 9000-BR and it is shown as an HID-Compliant Device in Device Manager; although my knowledge of connector names is not great, I will say I was not using a USB A connector and I think the connector was called a PS/2). By sheer luck I attempted to open BIOS and restarted my computer, and once in BIOS my keyboard worked perfectly fine. I attempted to uninstall the drivers and reinstall, however, I noticed that Avast! had installed a driver for my keyboard and it was reappearing (or not getting uninstalled) when I uninstalled the drivers. At this point, I identified the problem as being related to Avast! (it started once I installed trial mode and I saw Avast! drivers). I considered deleting the driver, but I had insufficient privilege (despite being admin, I guess it isn't supposed to be easy to delete things from System32) and I didn't want to have to research from the on-screen keyboard how to do so. Following this, I just did a system restore once noticing that avast! had made one earlier that day.
The driver in question was aswKbd.sys (C:/Windows/System32/drivers/asKbd.sys IIRC). Would it be safe to attempt to delete it if this happens in the future? Would uninstalling/reinstalling avast do the trick (I did not consider to do so)? Are system restores the best way to fix this problem? An inquiring mind wishes to know.
edit: If I shouldn't be asking about an already-resolved problem let me know and I'll just delete this post.