Handle left and right arrow key press events