title: How to tell when modifier keys are pressed/released
body: <p>I want to be able to tell when a modified key (<kbd>Ctrl</kbd> or <kbd>Shift</kbd>) is pressed or released.</p>
  
  <p>Basically, users can perform multiple keystrokes with a modifier key pressed and I don't want to perform an action until after it is released (think <a href="https://en.wikipedia.org/wiki/Emacs" rel="nofollow noreferrer">Emacs</a> with <kbd>Ctrl</kbd> + <kbd>X</kbd> + <kbd>S</kbd>).</p>
  
  <p>I was trying to do this with PreviewKeyUp and PreviewKeyDown, but that seems to handle normal keys and not modifiers. I can tell if the modifier key is pressed or not once I am in the event, but I can't tell if the modifier key was released and re-pressed between events.</p>