diff options
Diffstat (limited to 'c/key.c')
| -rw-r--r-- | c/key.c | 18 |
1 files changed, 18 insertions, 0 deletions
@@ -0,0 +1,18 @@ +#include <ncurses.h> +int main() { + initscr(); + cbreak(); + noecho(); + + printw("press h to do something, and q to quit.\n"); + + int ch; + while ((ch = getch()) != 'q') { + if (ch == 'h') { + printw("yep thats h\n"); + } + } + + endwin(); + return 0; +} |
