title: event.charCode always returning 0
body: <p>I have a page where I need to capture input from a user after they click on a part of the page (a div). Here's my code:</p>
  
  <pre><code>&lt;html&gt;
  &lt;body&gt;
  &lt;div style="background-color: lightpink" onkeydown="onkeydown1(event)" tabindex="-1"&gt;
  click me, then press a key
  &lt;/div&gt;
  
  &lt;script type="text/javascript"&gt;
  function onkeydown1(event)
  {
      alert(event.charCode);
  }
  &lt;/script&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>See it in action: <a href="http://jsfiddle.net/WRwBF/">http://jsfiddle.net/WRwBF/</a></p>
  
  <p>It took me the longest time to get this far because FireFox doesn't by default allow a div to "have focus." Eventually I found out that setting the tabindex for the div allows it to be in focus and the onkeydown event works.</p>
  
  <p>My problem now is that when I click in the div and press a key, the value "0" is returned regardless of what key is pressed. Why would this be happening, and how can I fix it?</p>
  
  <p>I would very much appreciate any guidance you might be able to give!</p>