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 rxvt.
I don't think ncurses will work. The link Basilevs provided talks about the "up arrow" key and the "down arrow" key, not a key press and release.