Select input text on focus and take action when enter key is pressed