I\'ve been trying to teach myself ncurses and I\'m loving it so far. However, I\'m trying to write a small little text editor like pico or nano. I\'ve got it set up fairly
I got the same KEY_ENTER problem recently, and I fixed it by replacing KEY_ENTER with 10 or \n, which is ASCII new line.
#include
int main() {
initscr(); /* init ncurses */
keypad(stdscr, TRUE); /* get keyboard input */
addstr("Press enter to exit.\n");
while (10 != getch()) {} /* 10 == enter */
endwin(); /* end ncurses */
return 0;
}