After more tests, it appears that only Firefox has this problem. This is a known bug. IE and Chrome works just fine with the autocomplete. The autocomplete keypress is eaten by the browser before sending it to the javascript, thus no Enter key is simulated. Thus, hitting Enter to select an entry from the autocomplete list will not fire the onkeypress event of the textbox HTML control.
On related notes:
There is a way to disable the autocomplete at the HTML level with AUTOCOMPLETE = "off`" but this is not recommanded.
Autocomplete works only on same URLs. Thus, if the same page is accessed but with a different URL, it won't work.