title: key events are working in Chrome but not in Internet Explorer 11
body: <p>I wrote a simple function that will hide my document on a web page if a key is triggered such as PrintScreen and Windows key.</p>
  
  <p>Here is the code:</p>
  
  <pre class="lang-js prettyprint-override"><code>document.onkeydown = windowskey;
  document.onkeyup = printscreenkey;
  
  
  function windowskey(e) {
    switch (e.which) {
      case 91: // left windows
      case 92: // right windows
        $("#documentViewer").hide();
  
        break;
    }
  }
  
  function printscreenkey(e) {
    switch (e.which) {
      case 44: // print screen
        copyToClipboard();
        $("#documentViewer").show();
  
        break;
      case 91: // left windows
      case 92: // right windows
        $("#documentViewer").show();
  
        break;
    }
  
  
  }
  </code></pre>
  
  <p>This functions works perfectly on Chrome browser but I tried testing it out on other browsers such as IE11 and it didn't respond or trigger any event when I pressed those keys.</p>
  
  <p>I really want to make it standardized so it works the same on all the browsers.</p>
  
  <p>Did I make any mistake here?</p>