Adds functionality to quit app when esc is pressed