title: jQuery - get character pressed - REGARDLESS of Keyboard
body: <p>I am trying to retrieve the character inserted into a textfield/input with jQuery.</p>
  
  <p>I use the usual: </p>
  
  <pre><code>var character = String.fromCharCode( e.keyCode || e.which );
  </code></pre>
  
  <p>method, but the only problem occurs when I use a different keyboard layout which I just noticed.</p>
  
  <p>So for example, on a Standard US Keyboard it works perfectly. On a German Keyboard for instanece, if I have the language set to English - basically rendering it a standard US Keyboard, when I press the characters equivalent to <code>:;'\,./[]=-</code>, I get the German characters I actually see on my keyboard (although the English equivalent of then is added to the input).</p>
  
  <p>Example: if I <code>console.log( character )</code> for the folowing sentence I get:</p>
  
  <ul>
  <li>In the input: <code>[]\';/.,</code></li>
  <li>In the console: <code>ÛÝºÞÜ¼¾¿</code></li>
  </ul>
  
  <p>My obvious question is, how can I make sure to get the true character inserter?</p>