title: C - Read Directly From the Keyboard Buffer
body: <p>This is a question in the C programming language.</p>
  
  <p>How do I directly read the data in the keyboard buffer?</p>
  
  <p>I want to directly access the data and store it in a variable. Of what data type should the variable be?</p>
  
  <p>I need it for an operating system our institute is currently developing. It's called ICS-OS and I am not quite sure about the specifics. It runs on x86, 32-bit machines (we run it on QEMU in a Linux box). Here is the link for the Google Code <a href="http://code.google.com/p/ics-os/" rel="nofollow">http://code.google.com/p/ics-os/</a>. I hope that's sufficient enough information.</p>
  
  <p>The operating system does not support the conio.h library so kbhit is not an option.</p>