void Window_PreTextInput(object sender, TextCompositionEventArgs e) { string text = e.Text; Direction dir; if (text == ">") { dir = Direction.Down; } else if (text == "<") { dir = Direction.Up; } else { return; } e.Handled = true; map.ScreenCenterPos += new DoubleVector3(dir); }