key press to switch views