title: How can I cast an int to a Keycode in Unity? (C#)
body: <p>I want to loop through a group of Keycodes to check for any keyboard event, and forward the ascii or decimal value of the key upon each <code>GetKeyUp</code> and <code>GetKeyDown</code> events.</p>
  
  <p>I tried this, but doesnt seem to work.</p>
  
  <pre><code>while (true)
  {
      for (int count = 97; count &lt; 123; count++)
      {
          if (Input.GetKeyDown(((char)count).ToString()))
          {
              return count;
          }
      }
  }
  </code></pre>
  
  <p>Is there a correct way to write this, or is there some other more efficient method i'm missing that doesnt involve manually assigning an <code>int</code> to each key and modifier key?</p>