box-o-sand/basics/key_code.c
2009-11-18 19:37:27 -05:00

15 lines
184 B
C

#include <ncurses.h>
int main()
{ int ch;
initscr();
cbreak();
noecho();
keypad(stdscr, TRUE);
ch = getch();
endwin();
printf("The key pressed is %d\n", ch);
}