如何发送ctrl + z

l--*_*''' 7 c# c++ string

如何转换ctrl+z为字符串?

我将此作为AT COMMAND发送到此计算机的连接设备.

基本上,我只是将一些字符放在字符串中以及ctrl+z字符串中

R S*_*hko 9

您可以使用\u转义嵌入任何Unicode字符:

"this ends with ctrl-z \u001A"
Run Code Online (Sandbox Code Playgroud)


Pra*_*ana 3

尝试以下将对您有用

serialPort1.Write("Test message from coded program" + (char)26);
Run Code Online (Sandbox Code Playgroud)

也尝试可能对你有用

serialPort1.Write("Test message from coded program");
   SendKeys.Send("^(z)");
Run Code Online (Sandbox Code Playgroud)

另请检查:http ://www.dreamincode.net/forums/topic/48708-sending-ctrl-z-through-serial/