title: How can I get the keyboard state in Linux?
body: <p>I want to check if the user pressed down the <em>Shift</em> key when the program starts. (That means, press down the <em>Shift</em> key before the program is started) It's a simple console program, nothing related to X.</p>
  
  <p>This maybe similar to the Win32 <code>GetKeyboardState()</code> function.</p>
  
  <p>I want to know whether I can do this and how, but not any pros and cons with accessing the terminal directly.</p>