added exit window when pressed key escape