21 lines
367 B
C
21 lines
367 B
C
#include "modes.h"
|
|
#include <ncurses.h>
|
|
void ncurses_modes() {
|
|
int ch;
|
|
raw();
|
|
keypad(stdscr, TRUE);
|
|
noecho();
|
|
|
|
printw("Type char to see it in bold\n");
|
|
ch = getch();
|
|
if (ch == KEY_F(1))
|
|
printw("F1 key pressed");
|
|
else {
|
|
printw("The pressed key is ");
|
|
attron(A_BOLD);
|
|
printw("%c", ch);
|
|
attroff(A_BOLD);
|
|
}
|
|
refresh();
|
|
getch();
|
|
}
|