Close modals with esc or backspace