If you want to get events like pressing the cursor keys, you need to do the following:
1. set the terminal/console in raw mode (as opposed to canonical mode, see glibc info pages)
2. read as usual
3. translate the recieved strings. Most non-alphanumerical keys are reported using multi character strings.
Step 3 is the tricky one; every type of terminal has a different way of doing it. You should use terminfo (or termcap) do do the translation, and NEVER EVER hardcode the linux console codes in your program, for the following reasons:
- linux console codes may change one day
- your program may run on an other NIX. Porting Linux to say BSD is almost trivial.
- someone may run your program over rsh/ssh/telnet