title: C# 'KeyCode' does not contain a definition for 'numberKey'
body: <p>I'm trying to make a shortcut from making several different &quot;if statements&quot;. Instead I only change one value that is given by a for loop.
  &quot;KeyCode.Alpha1&quot; suggests that I press the &quot;1&quot; key on the top of the keyboard and so on.
  So the &quot;numberKey&quot; variable has a string stored &quot;Alpha1&quot; but it's reading it as just &quot;numberKey&quot;. Then i get a error message saying 'KeyCode' does not contain a definition for 'numberKey'. Help</p>
  <pre><code>    private void Inventory()
      {
          for (int i = 1; i &lt;= items.Count; i++)
          {
              string numberKey = &quot;Alpha&quot; + i.ToString();
              if (Input.GetKeyDown(KeyCode.numberKey))
              {
                  items[currentItem].gameObject.SetActive(false);
                  currentItem = i--;
                  items[currentItem].gameObject.SetActive(true);
              }
          }
      }
  </code></pre>