Try scanning with MalwareBytes just to make sure you don't have any malware (you probably don't). Click the blue button at the left and scan with the free version:
Malwarebytes.org
Since you've tried a new keyboard, it may be that your keyboard input circuitry is toast. That is built into the Motherboard and requires a MoBo replacement. However, before coming to that conclusion, locate a free keyboard testing program and test it with that.
Let me google that for you
If you can run it from Safe Mode, all the better. In fact, try booting into safe mode and see if you have the same problem.