enter method: pressing enter after typing text