title: Is it possible to get the key code from onkeyup?
body: <p>I know that when working with JavaScript or jQuery. I can add an event listener on an object to call a function when a key is pressed.</p>
  
  <p>However, if the function is launched from HTML, as in the following example:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>function callMyFunction (importantothervalue) {
    //How can I get the keycode?
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;textarea onkeyup="callMyFunction(1);"&gt;&lt;/textarea&gt;
  &lt;textarea onkeyup="callMyFunction(2);"&gt;&lt;/textarea&gt;
  &lt;textarea onkeyup="callMyFunction(3);"&gt;&lt;/textarea&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>Is there any way to retrieve the key code from this context? Or do I always need to make an event handler if I want to get the key code?</p>
  
  <p>Is there any way for me to include <em>importantothervalue</em> in the resulting function call without encoding the information in the <em>id</em> or <em>class</em> attribute and extracting it from there?</p>