title: How to detect SHIFT key in jQuery keydown event handler?
body: <p>I have the following jQuery function</p>
  
  <pre><code>jQuery.fn.integerMask =
  function () {
  return this.each(function () {
    $(this).keydown(function (e) {
      var key = (e.keyCode ? e.keyCode : e.which);
      // allow backspace, tab, delete, arrows, numbers and keypad numbers ONLY
      return (
                key == 8 ||
                key == 9 ||
                key == 46 ||
                key == 37 ||
                key == 39 ||
                (key &gt;= 48 &amp;&amp; key &lt;= 57) ||
                (key &gt;= 96 &amp;&amp; key &lt;= 105));
                );
        });
      });
    };
  </code></pre>
  
  <p>which is used for entry of numbers. The problem is that SHIFT+8 results in a asterisk * character being entered. It appears the "8" key in combination w/ the SHIFT is permitted. How would I prevent the SHIFT+8 from being accepted and an "*" character inserted?</p>