updated input code, key flags used now, alt+enter toggles fullscreen