Dismissing modals on escape key press