#include #include #include int main(void) { initscr(); /* Init screen */ noecho(); /* Don’t echo keypresses */ for (;;) { /* Read char and encode it as a string */ char buf[5]; vis(buf, getch(), VIS_WHITE, 0); clear(); /* Clear screen */ printw("%s\n", buf); /* Write char to screen */ refresh(); /* Refresh display */ } /* unreachable */ }