I've had this problem for a long while...
First the computer goes into screensaver. Then when it resumes the currently focused window cannot receive keyboard events of any kind until focus is lost and then gained again.
Anyone seen something like this/knows why it happens?
As a side note, I always password lock the computer when going into screensaver mode.