box-o-sand/PracticingCurses/basics/key_code.c

15 lines
194 B
C
Raw Normal View History

2009-11-19 00:38:43 +00:00
#include <ncurses.h>
int main()
{ int ch;
initscr();
cbreak();
noecho();
keypad(stdscr, TRUE);
ch = getch();
endwin();
printf("The key pressed is %d\n", ch);
}