title: c# holding keys and shift at the same time
body: <p>I'm trying to increase the piece speed by holding A (or D) and Shilf at the same time like below</p>
  <pre><code>private void Form_KeyDown(object sender, KeyEventArgs e)
  {
      switch (e.KeyCode)
      {
          case Keys.A:
              if (position.X &gt; 5)
                  if (Control.ModifierKeys == Keys.Shift)
                      position.X-=6;
                  else
                      position.X-=3;
              break;
  
          case Keys.D:
              if (position.X &lt; 500)
                  if (Control.ModifierKeys == Keys.Shift)
                      position.X-=6;
                  else
                      position.X-=3;  
              break;
  
          default:
              break;
      }
  }
  </code></pre>
  <p>It worked, but only if I press Shift first then A (or D), if I hold A and then Shift, it stop. Can anyone help? I'm new to this.</p>