Read a single character from standard input into variable "key" without backslash escapes and using an interactive shell with the prompt $'Are you sure (Y/n) : ' and default value $'Y'
read -rp $'Are you sure (Y/n) : ' -ei $'Y' key