Functions for arrow key handlers and go_to