Got a better look at the problem. It seems to be that the text input is freezing my game when i'm using keys. The keys I guess are inputting text into the field and is the reason the game loses focus. The input is a black rectangular box with a white text input area. Text is dark bold black. There's a green return like symbol to the right of the input field, must mean submit.