Well that is strange. Maybe focus wasn't on the game, so it wasn't registering?
You could try clicking on the game screen first, then pressing an key.