Input now depends on if the window has focus or not.