getModifierState() returned as an error
<p>I am trying to debug a function using Firebug, for the JavaScript <a href="https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent#Methods" rel="noreferrer"><code>getModifierState()</code></a> method seems to be not working. Here is the beginning of the function:</p>

<pre><code>function kbdEq () {
  $(document).on ('keypress', function (e) {
    e.preventDefault();
    debugger;
    var x = e.charCode || e.keyCode;
// etc.
</code></pre>

<p>Jumping into Firebug is straightforward, but trying to test</p>

<pre><code>e.getModifierState('Alt')
</code></pre>

<p>(or any other keyboard event as a parameter, with or without quotes) results in this message from Firebug:  </p>

<blockquote>
  <p>e.getModifierState is not a function</p>
</blockquote>

<p>I am using Firefox 44.0.2.</p>

<p>What mistake am I (presumably) making here?</p>