As rightly suggested by "guapo" and "DAVEINCAPS", it seems to be an issue with the keyboard.
You may try connecting a good known keyboard to isolate the issue.
Also, please check if you have installed any software that changes the keyboard input. Example Perfect Keyboard or any macro related software.
If the issue has started recently, you can perform system restore. Please refer to the link mentioned below:
Thanks & Regards