bool IsTextChangingKey(Key key)
{
if (key == Key.Space || key == Key.Delete || key == Key.Back)
return true;
if (Key.A <= key && key <= Key.Z)
return true;
if (Key.D0 <= key && key <= Key.D9)
return true;
if (Key.NumPad0 <= key && key <= Key.NumPad9)
return true;
if (Key.Multiply <= key && key <= Key.Divide)
return true;
if (Key.OemSemicolon <= key && key <= Key.Oem102)
return true;
return false;
}