title: rich:hotKey for Form Submission?
body: <p>I've got a login form that looks something like this, using RichFaces and Seam:</p>
  
  <pre><code>&lt;h:form id="loginForm"&gt;
     &lt;h:outputLabel value="Username" /&gt;
     &lt;h:inputText value="#{identity.credentials.username}" /&gt;
     &lt;h:outputLabel value="Password" /&gt;
     &lt;h:inputText value="#{identity.credentials.password}" /&gt;
  
     &lt;h:commandLink action="#{identity.login()}" value="Login" /&gt;
  &lt;/h:form&gt;
  </code></pre>
  
  <p>I'd like to be able to allow the user to hit 'enter' and automatically submit the form to login.  I've tried using Richfaces' <code>&lt;rich:hotKey /&gt;</code> feature, but I think I'm doing something wrong.  The code I've put in looks like this:</p>
  
  <pre><code>&lt;rich:hotKey key="return"
     handler="#{rich:element('loginForm')}.submit()" /&gt;
  </code></pre>
  
  <p>However, when I hit enter inside the form, nothing happens.  Any idea what I'm doing wrong here?</p>