check typed string on enter