Can't use keyboard when resuming from sleep
Sometimes it can take a while for the sleepimage to make the login/password field active (there should be a blue line round the inside of the box when its active). I've noticed this behaviour in both 10.7 and 10.8 (but not in 10.6) on occasion, but no consistently. Usually when it happens it takes about 10 secs or so before I can type.

However, if you're saying you can type some characters (from the right side of the keyb) but not others (those on the left) that sounds most definitely like a hardware issue. 

Try connecting an external keyboard and seeing if the problem appears on that too. If no, you've a hardware issue. If yes, post back.