I'm trying to get the Key Codes for keys I press, AND find out the code for EXTENDED KEYS (non-ASCII keys)

For some reason nothing happens with F5 and the rest of the function keys send back more than i piece of info,,,So,,, how do I get a straight answer ?

My Results are to be later implemented in a #define clause in a header file for Direct Terminal IO usage.
(Doing this on DOS Wasn't a problem using conio.h)


#include <curses.h>
#include <stdio.h>

main()
{
int c=0;

puts("Press key code\n");
initscr();
noecho();
raw();

c=getch();
printf(" (%c) Key == %d Code\n", c, c);

endwin();
}