Microsoft have had variations on this problem reported quite a few times via their support portal. Here is one post and if you scroll down you will see a comment with a bunch of other reports all detailing similar(ish) problems.
Microsoft doesn't seem to be able to reproduce the problem but are "duping all the similar keyboard locking problems to a central bug, so that we can think a way to log the events if necessary". Which seems to be a generic response to a lot of these posts. Some people reported that it was simply becuase another window/pane/tab was in focus but I can see the OP obviously did not have this specific problem. Looks to me like one of those random unresolvable bugs. Hope I never get it! There's also numerous forum posts around the Internet, where users stated that removing certain 3rd party plugins has solved this issue.
I just spotted this particular post which has a possibly useful comment on it for you (which also link to this SO post. As I do not have the bug I cannot test its validity for you. The main point of it seems to be something about the keyboard layout switching.
I'm sorry for putting all this into an answer when technically it is not an answer and just a mass of research, but there was no way this was gonna fit into a comment. And also sorry for pretty much link spamming, but again there was no way I could extract everything that they said into this post. I hope there is something useful in there for you :)
EDIT: You should probably check the top rated answer below as this seems to solve a number of peoples issues, although I never had the Resharper plugin and still occasionally experienced this, but now I'm on VS2013 and have not had this problem re-occur, so maybe they fixed it...