Stop key-based movement when window goes out of focus

Key presses are going somewhere else when that happens. This fixes the bug where if a user pressed a key and then clicked on another window, the app would not register the key-up event and the user would continue to move w/o the key being down
fixes #366