kind of hard over a forum to troubleshoot, but besides the obvious: try different keyboard, different port etc
1.) Reboot into Safe Mode, disable your AV, download Combofix from Bleeping computer.com and let that run
2.) Start>Run>cmd command window opens, then type: sfc /scannow
Let that run and see if core windows files are corrupt or need replacing
3.) Download a free program "slim drivers" - let it check your pc and see if any of your drivers need updating.
4.) Start>Run>msconfig When window open go to general tab, select "diagnostic startup" - reboot, run the game, see if it works properly. If so, a specific program or driver is causing the issue, so narrow down from there.