When ESC is pressed first clear text in searchbox to end current search request. If no search is in progress quit application.