Javascript String.charCodeAt(index) and keyCodes
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/4285627/javascript-keycode-vs-charcode-utter-confusion">Javascript KeyCode vs CharCode = Utter Confusion</a>  </p>
</blockquote>



<p>What is the difference between the return value of <code>String.charCodeAt(index)</code> and JavaScript key codes?  And is there a way to translate between the two?</p>

<p>For example:</p>

<pre><code>console.log('.'.charCodeAt(0));  // prints 46 on Mac/Chrome
</code></pre>

<p>But the keyCode for '.' is 190.</p>
