title: Detect forwards delete in html input field
body: <p>I have a input field like so:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>const input = document.querySelector('input')
  
  input.addEventListener('keydown', e =&gt; {
    const keyCode = e.keyCode || e.which
    
    if (keyCode === /* BACKSPACE */ 8) {
      console.log('pressed backspace')
    }
  })</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;input type="text"&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>That snippet detects when the user presses backspace, except for a weird reason I only want to detect when the user does a backwards delete thing (which is alt+backspace on chromebook), which instead of deleting the character before the caret, it deletes the character after the caret. I'm looking for a cross browser and cross platform way to do this (as all devices have different keybindings for it)</p>
  
  <p>Thanks for your help.</p>