/* How to curse effectively. This has to be compiled with extra libraries: gcc -o whatchar whatchar.c -lcurses -ltermcap This program translates keypresses into ascii values. Function keys with long escape sequences are translated correctly. 5/4/90 */ #include #include main() { char a; initscr (); printf ("Hit space to get out; otherwise just hit keys to get their ascii values.\n"); a = 0; while (a != 32) { a = getch (); printf ("\n%d", a); } endwin (); }