Sending ctrl + C via serial port in C #?

How can I send my ctrl + c device via serial port in C #?

0
source share
1 answer

Serial ports do not transmit keys. They transmit bytes, which are usually ASCII character representations.

"Keys.ControlKey and Keys.C" is related to what is happening on the PC keyboard. But the serial ports do not transmit the entire state of the keyboard. For example, the F keys and arrows are completely outside the ASCII system.

The ASCII chart will tell you that, for example, Ctrl - A is 1, Ctrl - B is 2, Ctrl - C is 3, "A" is 65, etc.

+7
source

Source: https://habr.com/ru/post/1368934/


All Articles