Technology Advice by Ryan Taylor Adams

Keyboard Not Working Due to Missing Or Corrupt Drivers (Code 39)

January 18th, 2008 · 58 Comments · Printer Friendly Version


While I make an effort to update older posts to keep them relevant and technically accurate, the rapidly changing nature of the tech world makes it possible that the content of this post may no longer be relevant, current, or even accurate. Additionally, because of this post's age, adding new comments has been disabled. If you would like to contribute new information to this post, or have questions pertaining to this post, please use the Contact Form.

If your keyboard is not working, and its status is listed as “Code 39” in device manager, there is a good chance a simple registry edit can fix the issue. Here is what you need to do:

 ***UPDATE: I’ve created a REG file that when run should fix the problem. However, I’ve only tested the REG file on my computer and I cannot guarantee it will work for you. I would recommend you read the manual solution steps below and follow them if you feel comfortable. If not, or if the manual steps don’t solve your problem then try the automatic steps.

Automatic fix:

  1. Download this file to your desktop.
  2. Close down all open programs.
  3. Double click the file “kb_code39_fix.reg” on your desktop. If you receive a security warning, go ahead and select the option to run.
  4. When asked if you are sure you want to add the information into the registry, click “Yes.”
  5. You will be notified that not all data was successfully written to the registry, this is OK.
  6. Restart your computer and your keyboard should work.

Manual fix:

Note: Obviously, you probably can’t type as instructed in some of the steps below. Try using your mouse to copy and paste what you need to type from this post to the field it needs to be typed into.

  1. Go to your Start menu and click “Run…”
  2. In the Run box that opens, type “regedit” and press Enter.
  3. In the new window that opens, click the “Edit” menu, then “Find.”
  4. In the find filed, type “kbdclass” and press enter.
  5. The registry editor will now search for any key that has “kbdclass” in it. What you are looking for is any that have a name of “UpperFilters” and a data of ” something_random_here kbdclass” You may need to go to “Edit,” “Find Next” if the search finds something else first.
  6. Once you find the key, double click on it, and edit the text so that it includes only “kbdclass”. Press OK.
  7. Continue searching (using the “Edit” and “Find Next” menu) until you have found and edited all of the “UpperFilters” keys. Again, all should have a data filed that includes only “kbdclass”.
  8. Close the registry editor.
  9. Go to the device manager, find your keyboard in the list (which should still be reporting a “Code 39” error), and uninstall it.
  10. You should then restart your computer, and with any luck, your keyboard will work upon rebooting.

If that doesn’t work, your keyboard may be physically damaged, or the drivers on your computer may actually be corrupt.

If you found this post helpful, please consider making a donation to help cover the costs of this site:

58 responses so far ↓

  • 1 Melody // Jan 26, 2008 at 10:15 PM

    I have an HP1600 computer with Windows XP installed. The keyboard does not work. When I go into the control panel and check out hardware I find an error message Code 39 unable to locate driver. If I follow your advice above, how do I type in the information if the keyboard fails to wsork. My mouse will work so long as I don’t click something that requires me to enter from the keyboard. Then I have to push my off switch but it does not shut down completely, but it does return me to the use of the mouse. I am using my laptop to find answers.

  • 2 Ryan Adams // Jan 26, 2008 at 10:43 PM

    What I would recommend doing is using the right-click context menu to copy and paste words (or individual letters) to achieve the steps above. For example, e-mail yourself a link to this post from your working computer. Then open your e-mail on the non-functioning computer to navigate directly to this post. Once here, anytime you are instructed to type something, just highlight what you are supposed to type, right click on it, and select copy. Then go to where you are expected to type the information and right-click, then select paste.

    PS: If you need to delete something, highlight it and use the cut option.

  • 3 Ryan Adams // Jan 26, 2008 at 10:45 PM

    One other idea: You may be able to use CrossLoop to remote control the non-functional computer from a functional one. If you try it that way, and it works, please post back and let me know.

  • 4 Kjartan // Feb 2, 2008 at 10:42 AM

    Thanks man, your A freakin lifesaver… i have had this problem for so loong time… now i can finally use my keyboard again, and the first thing i will use it for is to thank you… thanks, your the man!

  • 5 Matt // Feb 5, 2008 at 1:02 PM

    Thanks for that reg file! My keyboard and touchpad on my laptop stopped working yesterday and I couldn’t find any fix. I tried disabling, uninstalling drivers, etc but nothing would work. Your file did the trick!


  • 6 Akshay Ghate // Feb 6, 2008 at 11:08 PM

    Thanks a ton !!!!
    I followed manual fix and it worked like a charm…… And for those who don’t know how to fill in data when keyboard is not functioning , Use on screen keyboard It can be found in accessories – accessibility – onscreen keyboard.

  • 7 Daniel // Feb 22, 2008 at 2:08 PM

    I used your automatic solution, and now the keyboard and mouse work great. The only thing is, now my computer will just shut down after about 15 minutes.

    Now when I say shut down, I mean that the screen goes black, the monitor light turns yellow as if it were in standby or the computer was off, and my keyboard and mouse have no input at all. I can’t even turn caps lock on/off.

    I read somewhere that altering registry files may cause things like this, so I’m wondering if you might know how I can fix this.


  • 8 Ryan Adams // Feb 22, 2008 at 7:54 PM

    You can always try using system restore to revert back to before you applied the automatic fix, then try the manual fix. However, I suspect the shutdown behavior is unrelated to the registry changes. There are many reasons why a computer will just “turn off”. I recommend you post your problem over at http://computing.net as someone there will be able to help you better.

  • 9 Nick I // Feb 28, 2008 at 1:18 PM

    I am never ask to confirm that I want to import the information into the registry. Why not?

    *Edited for clarity by Ryan Adams.

  • 10 Ryan Adams // Feb 28, 2008 at 4:23 PM

    Either you skipped a step in the instructions or your computer is incorrectly handling REG files. Try this instead:

    1. Open your Start Menu.
    2. Click on “Run…” (if you are in Vista just click on the box labeled “Start Search)
    3. Type “Regedit” and press enter / click “OK.”
    4. When the registry editor opens, click “File” then “Import…”
    5. Browse for and select the REG file you downloaded. Press “Open.”

    Be sure to restart your computer and that should do it.

  • 11 dankbud42o // Feb 29, 2008 at 7:49 AM

    Thank you sir! I’ve known about this issue with cd-roms but not keyboards. Thanks for the solution!

    *Edited for grammer by Ryan Adams.

  • 12 Nick I... // Feb 29, 2008 at 9:57 AM

    THANK YOU SO MUCH! If you were within driving distance of Key West… I’s come and shake your hand. It worked like a champ and I feel that I owe you one. Bravo!!!

  • 13 Ole // Mar 12, 2008 at 10:16 PM

    It worked great, I did it the manual way!
    I had looked every where for the answer……
    Now I can sleep!

  • 14 Richard // Mar 17, 2008 at 6:46 PM

    Thanks for the code 39 keyboard fix. I was really stuck on that one!

  • 15 Roberto // Mar 20, 2008 at 12:29 PM

    My keyboard error (code 19) was fixed at last!! Thanx to you!! I was getting really frustrated searching a lot of sites but not one had the answer ’til i got to this one and found the “kb_code39_fix”, it was quick and easy. Thanx again and keep up the good work. Now I can be at peace with my computer again and sleep again at night! haha

  • 16 Billy // Mar 22, 2008 at 3:23 PM

    Thank you so much my keyboard is working again thanks to your advice. I followed the manual fix and found the registry entry had tfsmon before kbdclass in the UpperFilters. This is due to a program called threatfire I recently removed from my system part of the program protects against keyloggers and this remained on my system after uninstall. My keyboard was still working until I ran my registry cleaner and deleted threatfire files as I knew I had uninstalled the program. This is how the problem occured but thanks to you my keyboard is now working.

    I can not thank you enough this has been causing me stress for days now. I really appreciate your help and as previously said by Kjartan the first thing I use it for is to thank you.

    Thank you so much

  • 17 Bill Deitrick // Apr 6, 2008 at 10:36 PM

    You are THE MAN (You’ve only heard this a bajillion tomes ) but virtually nobody ever gets a gold star from me and you get TWO. THE “REG” PROGRAM WORKED FLAWLESSLY<br />

    *Edited for content by Ryan Adams

  • 18 skoteinos // Apr 9, 2008 at 1:44 AM

    Thank you very very much! I couldn´t find any solution for a long time for this! I had this problem in Vista Ultimate with my MSI notebook.

  • 19 Luke S // Apr 20, 2008 at 4:55 PM

    You are awesome. I struggled and struggled, and this regedit did the trick. I can’t thank you enough.

  • 20 Steve // Apr 23, 2008 at 6:08 AM

    Thank you very much for the fix – the automatic way worked straight away! I thought my laptop keyboard and touchpad were goners… Once again, thank you.
    P.S. DO you know the reason why Vista HP (in my case anyway) would do this? I was singing it’s praises before this little episode… damned MS!!!

  • 21 Ryan Adams // Apr 23, 2008 at 9:39 AM

    @Steve: Glad it worked! It seems that this setting can get messed up any time you install a device or program that involves the keyboard. For example, a few people have had this issue after installing virtualization programs (Virtual PC / VMWare).

  • 22 Alison // Apr 27, 2008 at 11:30 AM

    Protonic.com suggested I try your fix – I’ve tried allsorts of things over the past week to get the keyboard to work and today I was about to give up but thought I’d try your fix as a last resort and it worked!!!!! so glad to get back to normal. Thanks!.

  • 23 karen mills // May 13, 2008 at 4:30 PM

    thank for the keyboard quick fix you have made my day. thanks again

  • 24 Ian // May 17, 2008 at 2:29 AM

    You are a legend. Thanks heaps. The on-screen keyboard tip from Akshay in an earlier post also helped. I used the manual fix and it worked fine.

  • 25 Potter // May 19, 2008 at 11:50 AM

    i tried the file but gives me a error saying, not all files were written to the reg. some keys are open with system/processes. any tips? on screen keyboard is killing me.

  • 26 Ryan Adams // May 19, 2008 at 12:35 PM

    @Potter: Your best bet is to try the manual fix then.

  • 27 robotnik // May 22, 2008 at 6:20 PM

    thanks a million for this ingenious fix!!
    an hour ago I found myself on the edge of reformat .. great work!

    if anyone’s interested. in my case the culprit goes by the name of ‘universal shield’. watch out for this crap!

  • 28 OB // Jun 3, 2008 at 8:34 AM

    Thanks a lot for the fix. Saved me a lot of time (multiple computers had the problem).

  • 29 Bob // Jun 18, 2008 at 12:37 PM

    Excellent work sir! I’m a tech and this was no easy fix to find! Spent hours chasing down dead end paths and searched for even longer. This fix worked for me. Had to do it manually in safe mode due to files being in use. BTW, this fixed my “Code 19” error.

  • 30 teo // Jul 12, 2008 at 6:43 AM

    you are the greatest !!

  • 31 dmusicstud // Jul 16, 2008 at 4:13 PM

    Thank you so much – fixed my problem in a jiffy! The reg file was great – since I couldn’t type, just loaded the file and it fixed! Thanks again!

  • 32 Arthur // Jul 26, 2008 at 10:09 AM

    Back up & running after 3 days of struggle & online searches for a cure to this Code 39 error problem. Thanks. It is amazing that such a major malfunction can be so poorly covered by MS (spit) & other sites. You are some guy.

  • 33 ken bartlett // Aug 28, 2008 at 11:10 AM

    i was wondering if i just go ahead and uninstall the keyboard without doing all that other stuff if that would mess the keyboard up even more.

  • 34 Ryan Adams // Aug 28, 2008 at 3:13 PM

    @ken bartlett: It probably won’t hurt, but I doubt it will fix the issue.

  • 35 Matt C // Sep 8, 2008 at 8:15 PM

    I used your reg edit tool to fix a code 39 keyboard driver issue. It worked the first time!! I spent 2 frustrating nights trying everything but a an OS reinstall — then I found your site.

  • 36 Ryan Adams // Sep 8, 2008 at 8:19 PM

    @Matt C: I’m glad it worked for you. Thanks fro the donation, and I hope you will visit my site again in the future.

  • 37 Ronen // Sep 21, 2008 at 10:31 AM

    Thanks man – you saved me after a few desperate hours…

    It works like magic.

  • 38 pacs // Sep 28, 2008 at 8:02 PM

    Thank you very much
    now i have my keyboard

  • 39 miles // Oct 5, 2008 at 8:15 AM

    robotnik, i also had this problem recently, i had just installed universal sheild. good idea you mentioning it cos i was racking my brains trying to figure out what caused this ANNOYING problem. thanks ryan too for your help!

  • 40 happy // Oct 9, 2008 at 11:39 AM

    great work, i just can repeat what others said before.

    I had no idea what caused the problem and also no idea how to fix it.

    THANKS ALOT for your programm to fix my registry, cause i tried to do it manual and failed. Greatgreatgreat

  • 41 happy_keyboard // Oct 15, 2008 at 11:37 AM

    thanks man,you are my keyboard master……

  • 42 Gulfport Technology Center // Oct 20, 2008 at 9:08 AM

    Thanks So much! After HOURS!!!! Such an elegant fix to. Thanks for taking the time to share!

  • 43 THANKYOU // Oct 20, 2008 at 10:57 AM

    legend!! thank you so much

  • 44 Regen // Oct 23, 2008 at 10:50 AM

    Have tried everything from hiting my laptop to uppdate the bios, nothing worked until i manage to find your blog (using character map).

    thanks again!

  • 45 Scotty // Oct 31, 2008 at 5:16 AM

    Thank you so much!

    I usually wouldn’t post a thank you note if i went to a website to fix a problem. But this is an exception. I googled for a few hours trying to find a solution and so far this one has worked. This is the first thing that I’m typing since i’ve restarted my computer and guess what. My keyboard is working! It was so annoying using my on-screen keyboard and then I would accidentally press a key and my touch pad also wouldn’t work.

    So thankyou very very very much. =). Anyone having the same problem who is thinking bout using this technique but scanning the comments, my advice is use it! It works great and there are all positive comments. That’s one of the main reasons I gave this one a go. There were so many positive responses so I’m adding mine.

    But yes Thank you =). For the 20th million time… but no thanks could be said enough.

  • 46 Laurel Campbell // Nov 5, 2008 at 8:19 AM

    I bow to you!! I have only had this problem for a week, but I was tearing my hair out trying to figure it out (any my husband was joining in!!). Started with the PS/2 mouse and keyboard not working, so I went to the USB devices. Still don’t know what is wrong with the ps/2 devices (liked them better) but at least I have a keyboard again.

    You have a very grateful base of people here, and I hope you have received donations. I will be making one now. Your knowledge base is well worth it, and needless to say I will bookmark this page!

  • 47 Ryan Adams // Nov 5, 2008 at 9:42 AM

    @Laurel Campbell: Glad to hear your problem is fixed. Thanks for the donation.

  • 48 irene knapp // Nov 14, 2008 at 5:50 PM

    Bless you, bless you, bless you!!!!!!!!!!!!

  • 49 Jeff // Nov 27, 2008 at 12:05 AM

    Ryan, You da man!!! After an hour of dinking around trying to fix my “corrupt” keyboard drivers, your manual RegEdit worked like a charm. Thank you!

  • 50 Jean-Louis // Nov 28, 2008 at 1:06 PM

    Thanks a lot, it works !
    I’ve saved my week end.
    A french user and donator too.
    Merci beaucoup, vous êtes formidable.