title: JSF: How to submit the form when the enter key is pressed?
body: <p>It would appear to be a simple requirement, but I haven't found a simple solution yet:</p>
  
  <p>In a JSF 1.2 / Richfaces 3.3 webapp, I have a form with input components of various types, followed by an <code>&lt;a4j:commandButton&gt;</code> and a <code>&lt;h:commandButton&gt;</code>. The former resets the form, the second performs some action with the data entered. </p>
  
  <p>My goal is to have this action triggered when the user presses the enter key while entering data. How can I do that?</p>
  
  <p><strong>Edit</strong>: Generally, I have more than one <code>&lt;h:commandButton&gt;</code> per <code>&lt;form&gt;</code>. I'd like to designate a particular one as default action. Also, I'd like the solution to play nice with AJAX (which we use extensively).</p>