title: Real-time keyboard input to console (in Windows)?
body: <p>I have a doubly-linked list class, where I want to add characters to the list as the user types them, or removes the last node in the list each time the user presses backspace, whilst displaying the results in console in real-time.</p>
  
  <p>What functions would I use to intercept individual keyboard input, and display it in real-time to the console? So the following results:</p>
  
  <p>User starts typing:</p>
  
  <blockquote>
    <p>Typ_  </p>
  </blockquote>
  
  <p>User stops typing:</p>
  
  <blockquote>
    <p>Typing this on screen_  </p>
  </blockquote>
  
  <p>User presses backspace 5 times:</p>
  
  <blockquote>
    <p>Typing this on s_  </p>
  </blockquote>
  
  <p>Particular OS is windows (vista, more specifically).</p>
  
  <p>As a side-note GetAsyncKeyState under windows.h appears to perhaps be for keyboard input, however the issue of real-time display of the console remains.</p>