You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
curses/main.c

25 lines
408 B

#include <stdlib.h>
#include <ncurses.h>
int main(char argc,char**argv) {
initscr();
raw();
keypad(stdscr,TRUE);
noecho();
printw("Type any character:");
int ch=getch();
if (ch==KEY_F(1)) {
printw("F1 Key pressed!");
} else {
attron(A_BOLD);
printw("%c",ch);
attroff(A_BOLD);
}
refresh();
getch();
endwin();
return 0;
}