private void Window_KeyUp(object sender, System.Windows.Input.KeyEventArgs e) { if (e.Key == Key.OemTilde) { consoleNowCloseable = true; } }