html - detect when form was submitted with enter -


i use detect enter:

<input type="submit" name=hiddenbutton value=enter style="display: none"> 

when placed before other form elements, appropriate $_request[hiddenbutton]when enter used submit form.

except chrome , other webkit-based browsers, don't activate first button when enter pressed.

is there way make work on browsers? (preferably little javascript possible)

i recomend adding focus listener make sure user not justdoing different typing in word document, because browsers detect key clicks without focus


Comments