A simpler method?
What's wrong with
key test = (key)input;
//it's a valid key
Innula Zenovka 11:16, 3 April 2012 (PDT)
- Nothing, imo. There is even a nice function on key in a section devoted to this topic exactly. -- Strife (talk|contribs) 20:56, 3 April 2012 (PDT)