If you want pressing Enter to behave the same way as clicking the commandButton you should set up a listener, otherwise the control is handed over the browser and that may not behave the way you want (I expect the browser always targets the first submit control in the form). I'll take a look on the hidden button.
Michal, thank you for answer, setting up a listener was the very first thought. Unfortunately, in my case it will require fixes in many places of legacy code. But I agree, setting up listener explicitly is more robust than relying on default browser behavior.
Nevertheless, I am still curious about the purpose of this "firstHref" button