title: Use F2 to write a text previously determined in a TextBox
body: <p>I'm trying to do a Form using VS2017 and C# , it will be for personal use.</p>
  
  <p>I want that when I press "F2" key in other application (like Word, Excel, Notepad) a text that was previously determined in a TextBox into Visual Studio automatically appears.</p>
  
  <p>For example, If the form has a TextBox1 with a text that says "Hello" I want that I press F2 in Word and the text "Hello" appears.</p>
  
  <p>By the moment I have this, but I think is wrong</p>
  
  <pre><code>using System;
  using System.Collections.Generic;
  using System.Data;
  using System.Drawing;
  using System.Linq;
  using System.Text;
  using System.Threading.Tasks;
  using System.Windows.Forms;
  
  namespace WindowsFormsApp1
  {
  public partial class Form1 : Form
  {
      public Form1()
      {
          InitializeComponent();
      }
  
      private void Form1_Load(object sender, EventArgs e)
      {
  
      }
  
      private void Form1_KeyDown(object sender, KeyEventArgs e)
      {
          if (e.KeyData == Keys.F2)
          {
          SendKeys.Send(textBox1.Text);
          }
      }
    }
  }
  </code></pre>
  
  <p>If you can help me with this, I'll be glad! :)</p>
  
  <p>Thank you!</p>