Why don't controlls work till I click the screen.

With the game in the editor, no keyboard keys work after pressing alt-p until I click inside the window. Also I have some GUI buttons in game, and again if I click those some (not all) keys no longer apply to the game. The keys applying to the game are supposed to be received in the controller event graph. I can probably figure out the in game GUI issue but how do I get focus on the game when I press alt-p?

Set Focus to Game Viewport?