#include #include #include int main(void) { WINDOW *_window = initscr(); int _rows; int _cols; cbreak(); /* Accept all keys */ keypad(_window, true); /* Don't echo things that are typed */ noecho(); /* Get the screen dimensions */ getmaxyx(_window, _rows, _cols); /* Don't display cursor */ curs_set(0); for (;;) { printw("Press a Key "); refresh(); int key = wgetch(_window); printw("%d \n", key); } endwin(); return 0; }