title: String to System.Windows.Input.Key
body: <p>I need a function that takes a String as an argument, and returns a System.Windows.Input.Key. E.G:</p>
  
  <pre><code>var x = StringToKey("enter"); // Returns Key.Enter
  var y = StringToKey("a"); // Returns Key.A
  </code></pre>
  
  <p>Is there any way to do this other than if/else's or switch statements?</p>