title: how to simulate a escape key at the end of a key sequence in c++?
body: <p>how to simulate a "escape key" as if an escape key has been pressed, at the end of a string sequence in c++?</p>
  
  <p>i need to provide the stdin input, which accepts string data until Escape key is pressed,</p>
  
  <p>for that it receives the characters correctly, but how do i send an 'escape key stroke' finally?</p>