title: Save Key Strokes to pass to "keys" parameter in SendKeys.Send()
body: <p>This is my code:</p>
  
  <pre><code>void tbHotkey_KeyDown(object sender, System.Windows.Input.KeyEventArgs e)
  {
      if (e.Key == Key.LeftShift || e.Key == Key.RightShift || e.Key == Key.LeftCtrl || e.Key == Key.RightCtrl || e.Key == Key.LeftAlt || e.Key == Key.RightAlt || e.Key == Key.LWin || e.Key == Key.RWin)
      {
          return;
      }
      bool IsWinDown = e.KeyboardDevice.IsKeyDown(Key.LWin) | e.KeyboardDevice.IsKeyDown(Key.RWin);
      bool IsCtrlDown = e.KeyboardDevice.IsKeyDown(Key.LeftCtrl) | e.KeyboardDevice.IsKeyDown(Key.RightCtrl);
      bool IsAltDown = e.KeyboardDevice.IsKeyDown(Key.LeftAlt) | e.KeyboardDevice.IsKeyDown(Key.RightAlt);
      bool IsShiftDown = e.KeyboardDevice.IsKeyDown(Key.LeftShift) | e.KeyboardDevice.IsKeyDown(Key.RightShift);
      if (IsWinDown | IsCtrlDown | IsAltDown | IsShiftDown)
      {
          (sender as TextBox).Text =
            (IsWinDown ? "Windows + " : "") +
            (IsCtrlDown ? "Control + " : "") +
            (IsAltDown ? "Alt + " : "") +
            (IsShiftDown ? "Shift + " : "") +
            e.Key.ToString();
      }
  }
  </code></pre>
  
  <p>It is saving the hotkey that the user types as <code>KeyEventArgs.Key.ToString()</code> but I need to save it as such that I can pass it to the "keys" parameter in <code>SendKeys.Send()</code> method easily.</p>
  
  <p>Can anyone suggest how do I do this?</p>