title: Get Character value from KeyCode in JavaScript... then trim
body: <p>This is what I have now:</p>
  
  <pre><code>$("input").bind("keydown",function(e){
      var value = this.value + String.fromCharCode(e.keyCode);
  }
  </code></pre>
  
  <p>If the <code>e.keyCode</code> may not be an ASCII character (<kbd>Alt</kbd>, <kbd>backspace</kbd>, <kbd>del</kbd>, <kbd>arrows</kbd>, etc.)...
  I would now need to <code>trim</code> these values from <code>value</code> somehow (preferably programmatically - not with lookup tables).</p>
  
  <p>I'm using jQuery.</p>
  
  <p>I must use the <code>keydown</code> event. <code>keyPress</code> doesn't activate for certain keys I need to capture (<kbd>Esc</kbd>, <kbd>del</kbd>, <kbd>backspace</kbd>, etc.).</p>
  
  <p>I cannot use <code>setTimeout</code> to get the input's value. <code>setTimeout(function(){},0)</code> is too slow.</p>