Adding event listener for escape key