Hi there
I had this exact problem today with both my shift and alt keys, and living in New Zealand, I don't really have good access to apple care of any kind, so after spending 2 hours on the phone with an assistant overseas, we came to this solution (Note, you need a spare hard drive/ USB over 16GB, and a spare wired/ USB wireless keyboard for this fix to be applied:
1. Restart your computer/turn it on, and once you hear the chime, hold down the command, and R keys, this will take you to the recovery menu
2. Once the recovery menu is loaded, click on the disk utility service (plug in your external hard drive/ USB now)
3. Erase the spare hard drive/ USB, or, if you don't want to lose data you already have, partition it so at least one partition contains at least 10GB of free space, name this partition something recognisable, like "backup"
4. Go back to the recovery menu, and click restore mac OSX
5. Follow the restore assistant, and when you arrive on the screen asking for the reinstall destination, choose your recently created disk partition.
6. You may be asked to type in your apple ID and password, do this using the spare keyboard, and you shouldn't have a problem using the lowercase and uppercase letters
7. Allow OSX to be downloaded/ installed on your drive partition
8. When the install is finished, turn off your computer, then turn it on again, again holding down the command and R keys, taking you again to the recovery menu
9. Once on the recovery menu again, click on the terminal option, under the utilities heading in the top left hand corner of the screen, then try to type normally, if the letters come out lowercase, and the numbers come out normally, then your problem is fixed, BUT THERES STILL ONE MORE STEP
10. Go to the apple logo in the top left hand corner, and select startup disc, when this loads, make sure you select the ORIGINAL disk you were using to run OSX (It should be called "Macintosh HDD" but if not, and you're unsure of which one it is, you can find out by going into disk utility again from the recovery menu, and looking at the first hard drive option)
11. Restart your mac as normal, and type in your password as you normally would, and you should be good to go!
This fix worked for me, as through downloading and installing OS X to a new hard drive, it reset the NVRAM, and any other issues your logic board may have been having while communicating with your regular hard drive, and if this fix still doesn't work, you can go back into recovery menu, select your fresh OSX install on your spare hard drive/usb as the default startup disk, restart your computer, then transfer any important documents you may have had onto your spare hard drive, and do a full restore of your normal hard drive through the recovery menu
Hope this helps anyone with future problems! I for one like being able to log in and use my computer properly, and this 100% helped me out, any problems, just reply to this post and I'll try to get back to you as soon as I can with some assistance!
Cheers,
Josh (Pootr33)