title: How to trigger input type button by pressing Enter key
body: <p>In JSF 1.2 and I'm using h:commandButton type="button" but the button does not trigger when I tab on it and press enter. I tried using <code>onkeypress="keyEnter(event)"</code></p>
  
  <pre><code>     function keyEnter(eve){
           if (eve.keyCode == 13) {
                document.getElementById(eve.target.id).click();
            }
            return false;
        }
  </code></pre>
  
  <p>and it triggers the button when enter key is pressed. Now here is my question, I have many h:commandButton elements with type button, what can I do in order to implement keyEnter(eve) to all the elements of type button?</p>
  
  <p>Thanks in advance.</p>