title: IE11 scroll stuttering on overriding default keydown scroll
body: <p><strong>EDIT: I'm remaking the whole question.</strong></p>
  
  <p>The context to the problem is more complex but, for the sake of simplification, <strong>let's say I want to override some of the default scrolling animations</strong>.</p>
  
  <p>For that purpose, I create a function- filterKeys()- that filters the 'scrolling keys' (PgUp, PgDn, up and down arrows, etc.). I'll leave you a piece of code with the function (as I said the context is more complex).</p>
  
  <pre><code>// Determines what type of scroll will be done depending on the key pressed.
      function filterKeys(e) {
          // If there's already a key associated with a scrolling animation pressed, or there's an animation running: return without doing anything.
          if (isPressed || isRunning)
              return;
  
          var keyMatch = false; // It will only call any function if the key pressed matches one of the key codes in the array.
          $.each(keyCodes, function (index, value) {
              if (e.which == keyCodes[index]) {
                  keyMatch = true;
                  return false; // It's tantamount to a break statement on a regular loop.
              }
          });
  
          if (keyMatch) {
              e.preventDefault();
              currentKey = e.which;
  
              switch (e.which) {
              case 40: // Down arrow key.
                  animateRegularScroll(e, 'down', 190);
                  break;
              case 38: // Up arrow key.
                  animateRegularScroll(e, 'up', 190);
                  break;
              case 34: // PgDn key.
                  animatePageScroll(e, 'down', 190);
                  break;
              case 33: // PgUp key.
                  animatePageScroll(e, 'up', 190);
                  break;
              case 35: // End key.
                  animateFullScroll(e, 'down');
                  break;
              case 36: // Home key.
                  animateFullScroll(e, 'up');
                  break;
              case 1: // Primary mouse button.
                  if ($(this).hasClass('bottom') || $(this).hasClass('top'))
                      animateRegularScroll(e, $(this).hasClass('bottom') ? 'down' : 'up', 190);
                  break;
              case 2: // Middle mouse button.
                  animateMMScroll(e);
                  break;
              }
          }
      }
  </code></pre>
  
  <p><strong>Now, the animations will go smooth except for the one where you have to maintain the up or down arrow keys pressed. That one will stutter in IE11.</strong></p>
  
  <p>A simplified fiddle (it's not well done, there's a lot of stuff missing but it serves the purpose): <a href="https://jsfiddle.net/LLu0esue/15/" rel="nofollow">https://jsfiddle.net/LLu0esue/15/</a> .
  Try with IE11 and you'll see the stutter. Try it with Chrome or Firefox and it will go smoothly.</p>
  
  <p>The thing is if I put e.preventDefault() in the first line of filterKeys(), it will go smoothly on IE11 too. (the same fiddle as before but with e.preventDefault() at the beginning: <a href="https://jsfiddle.net/LLu0esue/17/" rel="nofollow">https://jsfiddle.net/LLu0esue/17/</a>).</p>
  
  <p>Obviously that behaviour is undesirable because that way I would prevent Ctrl + T from opening a new tab, F5 from refreshing, etc. I do not want that.</p>
  
  <p>Any ideas as to why IE11 is behaving this way?</p>