Hello... your code... is well.... um, yeah... here is a very basic example of how to get input from the keyboard in C (in the console) that I whipped up just for you
Generated: Fri May 13 01:22:44 2005
[<strong>001</strong>] <strong>#include <curses.h></strong>
[<strong>002</strong>]
[<strong>003</strong>] int main()
[<strong>004</strong>] {
[<strong>005</strong>] initscr();
[<strong>006</strong>] <em>/* Input characters one by one */</em>
[<strong>007</strong>] cbreak();
[<strong>008</strong>] [i]/* Do not show us what we type */[i]
[<strong>009</strong>] noecho();
[<strong>010</strong>]
[<strong>011</strong>] [i]/* Keyboard mapping, stdscr is the typic 24x80 console */[i]
[<strong>012</strong>] keypad(stdscr, TRUE);
[<strong>013</strong>]
[<strong>014</strong>] printw("subtronic's little curses demo\n");
[<strong>015</strong>]
[<strong>016</strong>] /* Best way to represent an infinite loop :-) */
[<strong>017</strong>] for (;;) {
[<strong>018</strong>] switch (getch()) {
[<strong>019</strong>] case KEY_UP:
[<strong>020</strong>] printw("UP\n");
[<strong>021</strong>] break;
[<strong>022</strong>] case KEY_DOWN:
[<strong>023</strong>] printw("DOWN\n");
[<strong>024</strong>] break;
[<strong>025</strong>] case KEY_LEFT:
[<strong>026</strong>] printw("LEFT\n");
[<strong>027</strong>] break;
[<strong>028</strong>] case KEY_RIGHT:
[<strong>029</strong>] printw("RIGHT\n");
[<strong>030</strong>] break;
[<strong>031</strong>] }
[<strong>032</strong>] }
[<strong>033</strong>]
[<strong>034</strong>] endwin();
[<strong>035</strong>]
[<strong>036</strong>] return 0;
[<strong>037</strong>] }
Compile with -lcurses