Does anyone out there know how I can simulate sending an Escape key press and append it to a string that I am writing to an open port.
private Rs232 myPort = new Rs232();
try
{
// open the port
myPort.Open(1, 9600, 8, Rs232.DataParity.Parity_None, Rs232.DataStopBit.StopBit_1, 4096);
myPort.Write(Encoding.ASCII.GetBytes("?TEST1ON"));
myPort.Write(Encoding.ASCII.GetBytes("?TEST1OFF"));
myPort.Close();
}
The arrow pointing left is what I get when I press Alt 27 the decimal equivalent of the Escape key. It doesn't seem to be working...I need to send Escape then the string TEST1ON. Does anyone know what I can use to send an Escape keystroke as ascii?
Thank you
private Rs232 myPort = new Rs232();
try
{
// open the port
myPort.Open(1, 9600, 8, Rs232.DataParity.Parity_None, Rs232.DataStopBit.StopBit_1, 4096);
myPort.Write(Encoding.ASCII.GetBytes("?TEST1ON"));
myPort.Write(Encoding.ASCII.GetBytes("?TEST1OFF"));
myPort.Close();
}
The arrow pointing left is what I get when I press Alt 27 the decimal equivalent of the Escape key. It doesn't seem to be working...I need to send Escape then the string TEST1ON. Does anyone know what I can use to send an Escape keystroke as ascii?
Thank you