title: crossbrowser keypress for special keys (arrows,...) in javascript
body: <p>I am building a browser interface to a terminal. I need to catch both character (alphanumeric, dot, slash,...) and non-character key presses (arrows, F1-F12,...). Also, if the user holds some key down, it would be nice to get repeated keypresses (the function should be called repeatedly until key is released). The same goes for space key, characters,...</p>
  
  <p>I want this to be as cross-browser as possible (<a href="http://api.jquery.com/keypress/" rel="noreferrer">jQuery keypress</a> fails on that account). I have also tried using <a href="https://github.com/MichaelKuhinica/jquery.hotkeys" rel="noreferrer">fork of jquery.hotkeys.js</a>, but if I understand correctly, I can't catch both special and character keys in a single function (one should use keydown for former and keydown for the latter).</p>
  
  <p>Is there a JS library that would allow me to catch both character and special keys? </p>
  
  <p>I hope I'm not missing something obvious. :)</p>
  
  <p><strong>UPDATE</strong> To clarify: I am looking for the library that would hide the browser implementation details from me.</p>