title: Convert A Char To Keys
body: <p>I have a special char (/ @) That I want to convert to Keys.</p>
  
  <p>I am currently using this : </p>
  
  <pre><code>Keys k = (Keys)'/';
  </code></pre>
  
  <p>And while debugging, I get that k equals to : </p>
  
  <blockquote>
    <p>LButton | RButton | MButton | Back | Space type - System.Windows.Forms.Keys</p>
  </blockquote>
  
  <p>k's keycode was suppose to be 111.</p>
  
  <p>NOTE: The code does work for uppercase letters such as :</p>
  
  <pre><code>Keys k = (Keys)'Z';
  </code></pre>
  
  <p>In that case, k's key code is 90, which is ok.</p>
  
  <p>I'm trying to find a way to convert special chars to Keys. (or to their proper key code)</p>
  
  <p>Trying to send keys globally using : </p>
  
  <pre><code>public static void SendKey(byte keycode)
      {
          const int KEYEVENTF_EXTENDEDKEY = 0x1;
          const int KEYEVENTF_KEYUP = 0x2;
          keybd_event(keycode, 0x45, KEYEVENTF_EXTENDEDKEY, (UIntPtr)0);
          keybd_event(keycode, 0x45, KEYEVENTF_EXTENDEDKEY | KEYEVENTF_KEYUP, (UIntPtr)0);
      }
  
  SendKey((byte)Keys.{SomethingHere});
  </code></pre>