Your original form was behaving properly. Submit buttons are only successful if they are actually clicked (see the second bullet point here). Pressing enter to submit a form doesn't activate any specific submit button (a form can have more than one), so that control wasn't successful.
Actually, the spec says "if a form contains more than one submit button, only the activated submit button is successful" - which seems to suggest that if a form contains exactly one submit button, it should be successful even if the form is submitted by some other means. I seem to recall that the behavior you've described is a quirk of Internet Explorer 6.
In any case, I generally do this, sidestepping the problem entirely:
if ( $_SERVER['REQUEST_METHOD'] === 'POST' ) {
// ...do stuff...
}
Of course, that'll only work if your form uses the POST method. If you need to use the GET method for some reason (e.g., to make a search results page bookmarkable), your approach with the hidden form field is probably fine.
Brad's right - register_globals is evil. 🙂