Hi,
Does this happen when your typing your login password for Windows or for your email?
If it's with your Windows password try using the Ease of Access button that should be located on the bottom right hard corner. If it gives you the same result and if you have an external keyboard try logging in using it and see if it will let you do so because if it doesn't it could be a software problem.
If the problem is happening with your email or any site that requires your password do a virus/malware scan because it just be a virus/malware causing your keyboard to act weird. Also do try typing in notepad or Word to see if it's happening there as well because if it is it also be just the keyboard settings. Open Control Panel then look for...