Ajax Submitted forms with ENTER I have this code: 

function THEME_form_user_login_alter (&amp;$form, &amp;$form_state){
  $form['actions']['submit']['#ajax'] = array(       
        'callback' =&gt; 'ajax_process_form',
        'wrapper' =&gt; 'user-login',
        'effect' =&gt; 'fade',
        'speed' =&gt; 'fast',
        'method' =&gt; 'replace'
    );  

};


It work when i click on the submit button, but when i press ENTER Ajax doesn't get triggered.. Is there a way around that?

Edit: I tried to enable ajax on all fields and set keystroke to True, but then only one field is sent so i get an error as the form process script is expecting two fields.
I realize this is an old thread but it shows up high in the Google search results.

Just set your submit button's Ajax event to 'click'. I believe its default value is actually 'mousedown' which won't make it trigger when the enter key is pressed within a field of the form.

If you set it to 'click', that event will trigger when the submit button is clicked as well as when the enter button is pressed within a form field.