Autocomplete Js problem

Hello guys,
How do you make Autocomplete work when a user hits the enter key. I followed this Algolia’s doc to implement autocomplete-js and it only works when a user clicks on a result but nothing happens if the user hits the enter key. Is there a way to make it work when the enter key is hit?