Friday, 30 September 2011

USB Keyboard not responding, being detected as HID-compliant mouse

I recently rebooted a Windows 7 workstation that had no known pre-existing problems and observed a very obscure situation. After the system rebooted, the USB keyboard no longer worked. After gaining access to the desktop via the mouse and on screen keyboard I went into control panel to troubleshoot the error.



The Problem

At first I looked right past the HID-compliant mouse with the yellow exclamation mark next to it as I was troubleshooting a keyboard error not a mouse. After I removed the keyboard and re-plugged it in, it was clear that the system was indeed detecting the USB keyboard as a HID-compliant mouse. Windows has put a yellow exclamation on the mouse icon as it has been unable to start the device, this is of course because it is trying to use a mouse driver for a keyboard.


First I tried simply rebooting and even using different keyboards but neither worked.



The Resolution

Now before you go playing in the registry deleting values makes sure you know what you are doing and have made backups. I am not responsible for any damage you may do to your system.

I resolved this problem by clearing out the registry keys that Windows uses to store settings on the keyboard, mouse and HID-compliant devices. The down side to clearing out theses values is next time you plug in your favourite USB device, it will take some time to detect and install.

The keys in question are:

HKLM\SYSTEM\CurrentControlSet\Control\Class\{745A17A0-74D3-11D0-B6FE-00A0C90F57DA}- HID-compliant Devices
HKLM\SYSTEM\CurrentControlSet\Control\Class\{4D36E96B-E325-11CE-BFC1-08002BE10318} - Keyboard
HKLM\SYSTEM\CurrentControlSet\Control\Class\{4D36E96F-E325-11CE-BFC1-08002BE10318} - Mouse
You need to clear out all the keys storing information on devices you have previously plugged into the system. You can do this by going to each of the above keys with regedit and deleting all the 4 digit keys, but leave the Properties key alone. So in the below example of the keyboard key, I would delete the 0000, 0001, 0002 and 0006 keys.

Then you need to unplug your keyboard and reboot, once the system has rebooted plug the keyboard back in and wait for it to be detected, hopefully your keyboard is now working again!

If not you may need to dig a bit deeper, try another keyboard or worst case scenario, rebuild your system.

No comments:

Post a Comment