added detection for enter key