title: Receiving key press and key release events in Linux terminal applications?
body: <p>I would like to write a simple C program that will perform different actions based on both "key down" and "key up" events. This program will be run from inside <a href="http://en.wikipedia.org/wiki/Rxvt" rel="noreferrer">rxvt</a>.</p>
  
  <p>What library or mechanism should I use to access both key presses and releases? Is it true that reading <code>/dev/tty</code> will only provide key releases? Is this also true for termcap, terminfo, ncurses, and slang?  Is there a way to achieve this from within a terminal application?</p>