You have to click the game window for it to register keyboard input. You can also click on the keys if you have a different keyboard layout or are playing on a touch screen (it might be easier, too).