开发者

how to simulate a escape key at the end of a key sequence in c++?

开发者 https://www.devze.com 2023-01-07 22:41 出处:网络
how to simulate a \"escape key\" as if an escape key has been pressed, at the end of a string sequence in c++?

how to simulate a "escape key" as if an escape key has been pressed, at the end of a string sequence in c++?

i need to provide the stdin input, which accepts string data until Escape key is pressed,

for that it receives the characters correctly开发者_StackOverflow社区, but how do i send an 'escape key stroke' finally?


The ASCII code for "escape" is 27 (= 1b in hex). To send an escape you just have to send that character '\0x1b'.

0

精彩评论

暂无评论...
验证码 换一张
取 消