Sending ctrl+C over serial port in C#?

三世轮回 提交于 2019-12-01 01:53:35
Bob G

Serial ports don't transmit keys. They transmit bytes, which are normally the ASCII representations of characters.

"Keys.ControlKey & Keys.C" has to do with sensing what is going on on a PC keyboard. But serial ports do not transmit the whole state of the keyboard. For instance, the F keys and the arrows are entirely outside the ASCII system.

An ASCII chart will tell you that, for instance, Ctrl-A is 1, Ctrl-B is 2, Ctrl-C is 3, 'A' is 65, and so on.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!