Had a small issue today and found the answer here: http://forums.thedigitalfix.co.uk/forums/showthread.php?t=600250
The problem was that while playing Portal or Red Alert 3 the Esc Key was not working. As the post above says the fix was that Photoshop was capturing the keystroke for some unknown reason.
So, if you run into this issue while playing a game or otherwise, try closing Photoshop and potentially other applications to see if that resolves the issue.
FYI: I was playing Portal through Steam and have Photoshop CS4.