title: Firefox onkeydown detect pressed key
body: <p>From an input text I need to call a function to capture the onkeydown event and I need to pass a parameter to that event, for example:</p>
  
  <pre><code>&lt;input type="text" onkeydown="TextOnKeyDown('myPrefix');" /&gt;...
  </code></pre>
  
  <p>Then in that function I need to know what key was pressed. I use</p>
  
  <pre><code>function TextOnKeyDown(prefix) {
      var key = event.keyCode; 
      ...
  }
  </code></pre>
  
  <p>This works like a charm in IE, but not in Firefox. I've read that for firefox you have to pass an argument to the handler and then use it to get the key, something similar to:</p>
  
  <pre><code>&lt;input type="text" onkeydown="detectKey(event)"/&gt;
  ...
  function detectKey(e){
       var key = (document.all) ? e.keyCode : e.which; 
       ...    
  } 
  </code></pre>
  
  <p>But I cannot get to pass my parameter and the needed event parameter for firefox. Any suggestions?</p>