moved all input code to window manager class