Movement now uses events so that the character does not continue to move when you are not focused on the window