title: about accesskey in JSF 2
body: <p>I have  the next code:</p>
  
  <pre><code>&lt;h:form name="frm"&gt;
  &lt;h:panelGroup&gt;          
  &lt;p:commandButton value="Good" id='good' action="#{job.SetGood}" accesskey="g"/&gt;
  &lt;p:commandButton value="Bad" id='bad' action="#{job.SetBad}" accesskey="b"/&gt;
  &lt;/h:panelGroup&gt;
  </code></pre>
  
  <p></p>
  
  <p>And i need that the user can "press" the button with id='good' using just the key Space, and the button with the id='bad' using the key "backspace" I try many stuff but is not working...  for example I try calling the function cargar() on load  and is not working... somebody can help me?</p>
  
  <pre><code>function cargar()
  {
  document.getElementById("good").focus();
  document.onkeypress=function(e)
  {
  var esIE=(document.all);
  var esNS=(document.layers);
  tecla=(esIE) ? event.keyCode : e.which;
  if(tecla==32)
  {
  frm.submit();
   &lt;!--Also I try: document.getElementById("good").click();--&gt;
  }
  };
  }
  </code></pre>