title: Converting a Char into Java KeyEvent KeyCode
body: <p>I am writing a basic program that asks the user to type in a String, and I am trying to use a Robot (from <code>java.awt.Robot</code>)that will type this message back into another document after a delay. The Problem I have now is that I need to convert whatever I get from <code>message.charAt(i)</code> to a <code>KeyEvent.VK_[insert Char]</code> KeyCode. Is there a better way to do what I am trying to do? I suppose I could always just have a massive switch statement that gets the appropriate KeyCode but I was hoping there would be a more elegant way. My first thought, having done python for awhile, was to make  a string <code>"KeyEvent.VK_" + message.charAt(i)</code> and convert that to code somehow, but I think the only way to do that is using Reflection which is discouraged. </p>