title: More efficient way of screening KeyCodes on KeyDown Event
body: <p>I'm trying to fire an event perform some work when the user tries to enter only <strong>useful data</strong> into a form-field using the KeyDown event. But, I keep getting false alarms because the KeyDown event works for just any key! </p>
  
  <p>I'm trying not to make the event fire for buttons such as "Alt, Control, Shift, Esc, the F-keys, etc." What's the best way of doing this?</p>
  
  <p>What I have so far is this:</p>
  
  <pre><code>    private void formControl_KeyModified(object sender, KeyEventArgs e)
      {
          if (e.KeyCode != Keys.Shift &amp;&amp; e.KeyCode != Keys.CapsLock &amp;&amp; e.KeyCode != Keys.Tab &amp;&amp; e.KeyCode != Keys.Escape &amp;&amp;
              e.KeyCode != Keys.Insert &amp;&amp; e.KeyCode != Keys.Home &amp;&amp; e.KeyCode != Keys.End &amp;&amp; e.KeyCode != Keys.PageUp &amp;&amp;
              e.KeyCode != Keys.PageDown &amp;&amp; e.KeyCode != Keys.Up &amp;&amp; e.KeyCode != Keys.Down &amp;&amp; e.KeyCode != Keys.Left &amp;&amp;
              e.KeyCode != Keys.Right &amp;&amp; e.KeyCode != Keys.Control &amp;&amp; e.KeyCode != Keys.Alt &amp;&amp; e.KeyCode != Keys.NumLock &amp;&amp;
              e.KeyCode != Keys.Insert &amp;&amp; e.KeyCode != Keys.None &amp;&amp; e.KeyCode != Keys.PrintScreen &amp;&amp; e.KeyCode != Keys.Help &amp;&amp;
              e.KeyCode != Keys.ControlKey &amp;&amp; e.KeyCode != Keys.ShiftKey &amp;&amp; e.KeyCode != Keys.Sleep &amp;&amp; e.KeyCode != Keys.LWin &amp;&amp;
              e.KeyCode != Keys.RWin &amp;&amp; e.KeyCode != Keys.RMenu &amp;&amp; e.KeyCode != Keys.LMenu &amp;&amp; e.KeyCode != Keys.LShiftKey &amp;&amp;
              e.KeyCode != Keys.RShiftKey &amp;&amp; e.KeyCode != Keys.Pause &amp;&amp; e.KeyCode != Keys.F1 &amp;&amp; e.KeyCode != Keys.F2 &amp;&amp;
              e.KeyCode != Keys.F3 &amp;&amp; e.KeyCode != Keys.F4 &amp;&amp; e.KeyCode != Keys.F5 &amp;&amp; e.KeyCode != Keys.F6 &amp;&amp; e.KeyCode != Keys.F7 &amp;&amp;
              e.KeyCode != Keys.F8 &amp;&amp; e.KeyCode != Keys.F9 &amp;&amp; e.KeyCode != Keys.F10 &amp;&amp; e.KeyCode != Keys.F11 &amp;&amp; e.KeyCode != Keys.F12 &amp;&amp;
              e.KeyCode != Keys.L)
          {
               // Do some work...
          }
      }
  </code></pre>
  
  <p>However, that doesn't quite seem like the best way to handle this to me. <strong>Again, I'm just trying to get keys for the characters that could be entered into a textbox</strong> (such as 213135udf!@#%@!#@#%15nfaosdf~!@}{:?>, and so on)! Any help at all will be appreciated, thanks!</p>
  
  <p>Sincerely,
  Isaac D.</p>
  
  <p>(Edited for clarity and quality)</p>