I would recommend to use a thread pool, to queue your logic of sending data to server.
ThreadPool.QueueUserWorkItem(SendData, "data");
then, you may define the SendData function with the logic you wrote in the KeyDown handler.
public void SendData(object inputParam)
{
try
{
string input = inputParam as string;
writer.Write(Form1.GetSysName() + " : " + input);
...
}
catch (SocketException se)
{
output_text.Text += "\n Error waiting Object";
}
}
However, if you want your messages to be sent in synchronized way then, threadpool will not be a good choice, there you may just spawn a thread.
Thread th = new Thread(SendData);
th.Start();
But, you may also need to define a mechanism to keep queuing your requests.