From 3b539f06811a181249d6a154a5fce54d95ce9693 Mon Sep 17 00:00:00 2001 From: Martin Michalec Date: Tue, 10 Nov 2026 12:34:34 +0300 Subject: publish --- src/ncurses-test.c | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 src/ncurses-test.c (limited to 'src/ncurses-test.c') diff --git a/src/ncurses-test.c b/src/ncurses-test.c new file mode 100644 index 0000000..a34f507 --- /dev/null +++ b/src/ncurses-test.c @@ -0,0 +1,28 @@ +#include +#include +#include + +int +main (int argc, char *argv[]) +{ + initscr (); + raw (); + noecho (); + keypad (stdscr, TRUE); + + printw ("Type any character to see it in bold\n"); + int 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 (); + endwin (); + + return EXIT_SUCCESS; +} -- cgit v1.3.1