I want to write a function like so,
public System.Windows.Input.Key ResolveKey(char charToResolve)
{
// Code goes here, that resolves the charToResolve
// in to the Key enumerated value
// (For example with '.' as the character for Key.OemPeriod)
}
I know I can write a huge Switch-case to match the character, but is there any other way? The thing with this is the Key enum's string may not match with the character so Enum.IsDefined will not work
Any ideas?
Update: This is in Windows environment