title: Cross-Browser Cross-OS way to get keyCode/character pressed onkeydown event
body: <p>For example, if i have this:   </p>
  
  <pre><code>&lt;input type='text' onkeydown='doSomething()' /&gt;
  
  &lt;script&gt;
    function doSomething() {
      // ?
    }
  &lt;/script&gt;
  </code></pre>
  
  <p>i need to get the keyCode/character pressed in cross-browser/os way.. how to do it? i've tried  about this ~6 years ago and as i remember that time, it was not easy, sometimes i must pass event or something to get it work on opera or IE cmiiw</p>